Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
37bbe9d4
Commit
37bbe9d4
authored
Oct 21, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Added Gdip[Get/Set]TextureWrapMode.
parent
92f5aa0a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
2 deletions
+87
-2
brush.c
dlls/gdiplus/brush.c
+33
-0
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+2
-2
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-0
brush.c
dlls/gdiplus/tests/brush.c
+49
-0
gdiplusflat.h
include/gdiplusflat.h
+2
-0
No files found.
dlls/gdiplus/brush.c
View file @
37bbe9d4
...
...
@@ -605,6 +605,7 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image,
(
*
texture
)
->
brush
.
gdibrush
=
CreateBrushIndirect
(
&
(
*
texture
)
->
brush
.
lb
);
(
*
texture
)
->
brush
.
bt
=
BrushTypeTextureFill
;
(
*
texture
)
->
wrap
=
imageattr
->
wrap
;
GdipFree
(
dibits
);
GdipFree
(
buff
);
...
...
@@ -913,6 +914,21 @@ GpStatus WINGDIPAPI GdipGetTextureTransform(GpTexture *brush, GpMatrix *matrix)
}
/******************************************************************************
* GdipGetTextureWrapMode [GDIPLUS.@]
*/
GpStatus
WINGDIPAPI
GdipGetTextureWrapMode
(
GpTexture
*
brush
,
GpWrapMode
*
wrapmode
)
{
TRACE
(
"(%p, %p)
\n
"
,
brush
,
wrapmode
);
if
(
!
brush
||
!
wrapmode
)
return
InvalidParameter
;
*
wrapmode
=
brush
->
wrap
;
return
Ok
;
}
/******************************************************************************
* GdipResetTextureTransform [GDIPLUS.@]
*/
GpStatus
WINGDIPAPI
GdipResetTextureTransform
(
GpTexture
*
brush
)
...
...
@@ -1138,6 +1154,23 @@ GpStatus WINGDIPAPI GdipSetTextureTransform(GpTexture *texture,
return
Ok
;
}
/******************************************************************************
* GdipSetTextureWrapMode [GDIPLUS.@]
*
* WrapMode not used, only stored
*/
GpStatus
WINGDIPAPI
GdipSetTextureWrapMode
(
GpTexture
*
brush
,
GpWrapMode
wrapmode
)
{
TRACE
(
"(%p, %d)
\n
"
,
brush
,
wrapmode
);
if
(
!
brush
)
return
InvalidParameter
;
brush
->
wrap
=
wrapmode
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipSetLineColors
(
GpLineGradient
*
brush
,
ARGB
color1
,
ARGB
color2
)
{
...
...
dlls/gdiplus/gdiplus.spec
View file @
37bbe9d4
...
...
@@ -399,7 +399,7 @@
@ stdcall GdipGetTextRenderingHint(ptr ptr)
@ stub GdipGetTextureImage
@ stdcall GdipGetTextureTransform(ptr ptr)
@ st
ub GdipGetTextureWrapMode
@ st
dcall GdipGetTextureWrapMode(ptr ptr)
@ stub GdipGetVisibleClipBounds
@ stub GdipGetVisibleClipBoundsI
@ stdcall GdipGetWorldTransform(ptr ptr)
...
...
@@ -596,7 +596,7 @@
@ stub GdipSetTextContrast
@ stdcall GdipSetTextRenderingHint(ptr long)
@ stdcall GdipSetTextureTransform(ptr ptr)
@ st
ub GdipSetTextureWrapMode
@ st
dcall GdipSetTextureWrapMode(ptr long)
@ stdcall GdipSetWorldTransform(ptr ptr)
@ stdcall GdipShearMatrix(ptr long long long)
@ stdcall GdipStartPathFigure(ptr)
...
...
dlls/gdiplus/gdiplus_private.h
View file @
37bbe9d4
...
...
@@ -139,6 +139,7 @@ struct GpLineGradient{
struct
GpTexture
{
GpBrush
brush
;
GpMatrix
*
transform
;
WrapMode
wrap
;
/* not used yet */
};
struct
GpPath
{
...
...
dlls/gdiplus/tests/brush.c
View file @
37bbe9d4
...
...
@@ -235,6 +235,54 @@ static void test_transform(void)
ReleaseDC
(
0
,
hdc
);
}
static
void
test_texturewrap
(
void
)
{
GpStatus
status
;
GpTexture
*
texture
;
GpGraphics
*
graphics
=
NULL
;
GpBitmap
*
bitmap
;
HDC
hdc
=
GetDC
(
0
);
GpWrapMode
wrap
;
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipCreateBitmapFromGraphics
(
1
,
1
,
graphics
,
&
bitmap
);
expect
(
Ok
,
status
);
status
=
GdipCreateTexture
((
GpImage
*
)
bitmap
,
WrapModeTile
,
&
texture
);
expect
(
Ok
,
status
);
/* NULL */
status
=
GdipGetTextureWrapMode
(
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetTextureWrapMode
(
texture
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetTextureWrapMode
(
NULL
,
&
wrap
);
expect
(
InvalidParameter
,
status
);
/* get */
wrap
=
WrapModeClamp
;
status
=
GdipGetTextureWrapMode
(
texture
,
&
wrap
);
expect
(
Ok
,
status
);
expect
(
WrapModeTile
,
wrap
);
/* set, then get */
wrap
=
WrapModeClamp
;
status
=
GdipSetTextureWrapMode
(
texture
,
wrap
);
expect
(
Ok
,
status
);
wrap
=
WrapModeTile
;
status
=
GdipGetTextureWrapMode
(
texture
,
&
wrap
);
expect
(
Ok
,
status
);
expect
(
WrapModeClamp
,
wrap
);
status
=
GdipDeleteBrush
((
GpBrush
*
)
texture
);
expect
(
Ok
,
status
);
status
=
GdipDisposeImage
((
GpImage
*
)
bitmap
);
expect
(
Ok
,
status
);
status
=
GdipDeleteGraphics
(
graphics
);
expect
(
Ok
,
status
);
ReleaseDC
(
0
,
hdc
);
}
START_TEST
(
brush
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -254,6 +302,7 @@ START_TEST(brush)
test_getbounds
();
test_getgamma
();
test_transform
();
test_texturewrap
();
GdiplusShutdown
(
gdiplusToken
);
}
include/gdiplusflat.h
View file @
37bbe9d4
...
...
@@ -208,6 +208,8 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage*,GDIPCONST GpImageAttributes*,
REAL
,
REAL
,
REAL
,
REAL
,
GpTexture
**
);
GpStatus
WINGDIPAPI
GdipCreateTextureIAI
(
GpImage
*
,
GDIPCONST
GpImageAttributes
*
,
INT
,
INT
,
INT
,
INT
,
GpTexture
**
);
GpStatus
WINGDIPAPI
GdipGetTextureWrapMode
(
GpTexture
*
,
GpWrapMode
*
);
GpStatus
WINGDIPAPI
GdipSetTextureWrapMode
(
GpTexture
*
,
GpWrapMode
);
GpStatus
WINGDIPAPI
GdipDeleteBrush
(
GpBrush
*
);
GpStatus
WINGDIPAPI
GdipGetBrushType
(
GpBrush
*
,
GpBrushType
*
);
GpStatus
WINGDIPAPI
GdipGetLineGammaCorrection
(
GpLineGradient
*
,
BOOL
*
);
...
...
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