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
70c9e4fb
Commit
70c9e4fb
authored
Feb 11, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Feb 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Store an image in texture brushes, and use it when cloning.
parent
53e326a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
7 deletions
+19
-7
brush.c
dlls/gdiplus/brush.c
+18
-7
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-0
No files found.
dlls/gdiplus/brush.c
View file @
70c9e4fb
...
...
@@ -160,13 +160,23 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone)
break
;
}
case
BrushTypeTextureFill
:
*
clone
=
GdipAlloc
(
sizeof
(
GpTexture
));
if
(
!*
clone
)
return
OutOfMemory
;
{
GpStatus
stat
;
GpTexture
*
texture
=
(
GpTexture
*
)
brush
;
GpTexture
*
new_texture
;
memcpy
(
*
clone
,
brush
,
sizeof
(
GpTexture
)
);
stat
=
GdipCreateTexture
(
texture
->
image
,
texture
->
wrap
,
&
new_texture
);
(
*
clone
)
->
gdibrush
=
CreateBrushIndirect
(
&
(
*
clone
)
->
lb
);
break
;
if
(
stat
==
Ok
)
{
memcpy
(
new_texture
->
transform
,
texture
->
transform
,
sizeof
(
GpMatrix
));
*
clone
=
(
GpBrush
*
)
new_texture
;
}
else
*
clone
=
NULL
;
return
stat
;
}
default:
ERR
(
"not implemented for brush type %d
\n
"
,
brush
->
bt
);
return
NotImplemented
;
...
...
@@ -829,10 +839,9 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image,
(
*
texture
)
->
brush
.
gdibrush
=
CreateBrushIndirect
(
&
(
*
texture
)
->
brush
.
lb
);
(
*
texture
)
->
brush
.
bt
=
BrushTypeTextureFill
;
(
*
texture
)
->
wrap
=
imageattr
->
wrap
;
(
*
texture
)
->
image
=
new_image
;
exit:
GdipDisposeImage
(
new_image
);
if
(
status
==
Ok
)
{
TRACE
(
"<-- %p
\n
"
,
*
texture
);
...
...
@@ -845,6 +854,7 @@ exit:
GdipFree
(
*
texture
);
*
texture
=
NULL
;
}
GdipDisposeImage
(
new_image
);
TRACE
(
"<-- error %u
\n
"
,
status
);
}
...
...
@@ -946,6 +956,7 @@ GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush *brush)
break
;
case
BrushTypeTextureFill
:
GdipDeleteMatrix
(((
GpTexture
*
)
brush
)
->
transform
);
GdipDisposeImage
(((
GpTexture
*
)
brush
)
->
image
);
break
;
default:
break
;
...
...
dlls/gdiplus/gdiplus_private.h
View file @
70c9e4fb
...
...
@@ -180,6 +180,7 @@ struct GpLineGradient{
struct
GpTexture
{
GpBrush
brush
;
GpMatrix
*
transform
;
GpImage
*
image
;
WrapMode
wrap
;
/* not used yet */
};
...
...
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