Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
63bfd40f
Commit
63bfd40f
authored
Jun 11, 2007
by
Evan Stade
Committed by
Alexandre Julliard
Jun 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: First pen implementation.
parent
faa29e92
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
128 additions
and
3 deletions
+128
-3
Makefile.in
dlls/gdiplus/Makefile.in
+2
-1
gdiplus.c
dlls/gdiplus/gdiplus.c
+14
-0
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+2
-2
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+38
-0
pen.c
dlls/gdiplus/pen.c
+72
-0
No files found.
dlls/gdiplus/Makefile.in
View file @
63bfd40f
...
...
@@ -7,7 +7,8 @@ IMPORTLIB = libgdiplus.$(IMPLIBEXT)
IMPORTS
=
gdi32 advapi32 kernel32 ntdll
C_SRCS
=
\
gdiplus.c
gdiplus.c
\
pen.c
@MAKE_DLL_RULES@
...
...
dlls/gdiplus/gdiplus.c
View file @
63bfd40f
...
...
@@ -79,3 +79,17 @@ void WINGDIPAPI GdipFree(void* ptr)
{
HeapFree
(
GetProcessHeap
(),
0
,
ptr
);
}
COLORREF
ARGB2COLORREF
(
ARGB
color
)
{
/*
Packing of these color structures:
COLORREF: 00bbggrr
ARGB: aarrggbb
FIXME:doesn't handle alpha channel
*/
return
(
COLORREF
)
((
color
&
0x0000ff
)
<<
16
)
+
(
color
&
0x00ff00
)
+
((
color
&
0xff0000
)
>>
16
);
}
dlls/gdiplus/gdiplus.spec
View file @
63bfd40f
...
...
@@ -111,7 +111,7 @@
@ stub GdipCreatePathGradientFromPath
@ stub GdipCreatePathGradientI
@ stub GdipCreatePathIter
@ st
ub GdipCreatePen1
@ st
dcall GdipCreatePen1(long long long ptr)
@ stub GdipCreatePen2
@ stub GdipCreateRegion
@ stub GdipCreateRegionHrgn
...
...
@@ -136,7 +136,7 @@
@ stub GdipDeleteMatrix
@ stub GdipDeletePath
@ stub GdipDeletePathIter
@ st
ub GdipDeletePen
@ st
dcall GdipDeletePen(ptr)
@ stub GdipDeletePrivateFontCollection
@ stub GdipDeleteRegion
@ stub GdipDeleteStringFormat
...
...
dlls/gdiplus/gdiplus_private.h
0 → 100644
View file @
63bfd40f
/*
* 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
*/
#ifndef __WINE_GP_PRIVATE_H_
#define __WINE_GP_PRIVATE_H_
#include "windef.h"
#include "winbase.h"
#include "gdiplus.h"
#define GP_DEFAULT_PENSTYLE (PS_GEOMETRIC | PS_ENDCAP_FLAT)
COLORREF
ARGB2COLORREF
(
ARGB
color
);
struct
GpPen
{
UINT
style
;
COLORREF
color
;
GpUnit
unit
;
REAL
width
;
HPEN
gdipen
;
};
#endif
dlls/gdiplus/pen.c
0 → 100644
View file @
63bfd40f
/*
* 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 "gdiplus.h"
#include "gdiplus_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
gdiplus
);
GpStatus
WINGDIPAPI
GdipCreatePen1
(
ARGB
color
,
FLOAT
width
,
GpUnit
unit
,
GpPen
**
pen
)
{
LOGBRUSH
lb
;
GpPen
*
gp_pen
;
gp_pen
=
GdipAlloc
(
sizeof
(
GpPen
));
if
(
!
pen
)
return
OutOfMemory
;
gp_pen
->
style
=
GP_DEFAULT_PENSTYLE
;
gp_pen
->
color
=
ARGB2COLORREF
(
color
);
gp_pen
->
width
=
width
;
gp_pen
->
unit
=
unit
;
/* FIXME: Currently only solid lines supported. */
lb
.
lbStyle
=
BS_SOLID
;
lb
.
lbColor
=
gp_pen
->
color
;
lb
.
lbHatch
=
0
;
if
((
gp_pen
->
unit
==
UnitWorld
)
||
(
gp_pen
->
unit
==
UnitPixel
))
{
gp_pen
->
gdipen
=
ExtCreatePen
(
gp_pen
->
style
,
(
INT
)
gp_pen
->
width
,
&
lb
,
0
,
NULL
);
}
else
{
FIXME
(
"UnitWorld, UnitPixel only supported units"
);
return
NotImplemented
;
}
if
(
!
gp_pen
)
return
GenericError
;
*
pen
=
gp_pen
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipDeletePen
(
GpPen
*
pen
)
{
if
(
!
pen
)
return
InvalidParameter
;
DeleteObject
(
pen
->
gdipen
);
GdipFree
(
pen
);
return
Ok
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment