mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 08:03:37 +00:00
gdiplus: Added font constructor.
This commit is contained in:
parent
9d6e0750f2
commit
d060aeccca
|
@ -10,6 +10,7 @@ EXTRALIBS = -luuid
|
|||
C_SRCS = \
|
||||
brush.c \
|
||||
customlinecap.c \
|
||||
font.c \
|
||||
gdiplus.c \
|
||||
graphics.c \
|
||||
graphicspath.c \
|
||||
|
|
42
dlls/gdiplus/font.c
Normal file
42
dlls/gdiplus/font.c
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright (C) 2007 Google (Evan Stade)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
|
||||
#include "objbase.h"
|
||||
|
||||
#include "gdiplus.h"
|
||||
#include "gdiplus_private.h"
|
||||
|
||||
GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc,
|
||||
GDIPCONST LOGFONTW *logfont, GpFont **font)
|
||||
{
|
||||
if(!logfont || !font)
|
||||
return InvalidParameter;
|
||||
|
||||
*font = GdipAlloc(sizeof(GpFont));
|
||||
if(!*font) return OutOfMemory;
|
||||
|
||||
memcpy(&(*font)->lfw, logfont, sizeof(LOGFONTW));
|
||||
|
||||
return Ok;
|
||||
}
|
|
@ -88,7 +88,7 @@
|
|||
@ stub GdipCreateFontFamilyFromName
|
||||
@ stub GdipCreateFontFromDC
|
||||
@ stub GdipCreateFontFromLogfontA
|
||||
@ stub GdipCreateFontFromLogfontW
|
||||
@ stdcall GdipCreateFontFromLogfontW(ptr ptr ptr)
|
||||
@ stub GdipCreateFromHDC2
|
||||
@ stdcall GdipCreateFromHDC(long ptr)
|
||||
@ stdcall GdipCreateFromHWND(long ptr)
|
||||
|
|
|
@ -170,4 +170,8 @@ struct GpImageAttributes{
|
|||
WrapMode wrap;
|
||||
};
|
||||
|
||||
struct GpFont{
|
||||
LOGFONTW lfw;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -236,6 +236,8 @@ GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes*,
|
|||
GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes*,WrapMode,
|
||||
ARGB,BOOL);
|
||||
|
||||
GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC,GDIPCONST LOGFONTW*,GpFont**);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -36,6 +36,7 @@ class GpBitmap : public GpImage {};
|
|||
class GpPathGradient : public GpBrush {};
|
||||
class GpLineGradient : public GpBrush {};
|
||||
class GpTexture : public GpBrush {};
|
||||
class GpFont {};
|
||||
|
||||
#else /* end of c++ declarations */
|
||||
|
||||
|
@ -54,6 +55,7 @@ typedef struct GpBitmap GpBitmap;
|
|||
typedef struct GpPathGradient GpPathGradient;
|
||||
typedef struct GpLineGradient GpLineGradient;
|
||||
typedef struct GpTexture GpTexture;
|
||||
typedef struct GpFont GpFont;
|
||||
|
||||
#endif /* end of c declarations */
|
||||
|
||||
|
|
Loading…
Reference in a new issue