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
1cca99dc
Commit
1cca99dc
authored
Nov 04, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Added CachedBitmap calls.
parent
7051bf5e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
3 deletions
+70
-3
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+3
-3
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+4
-0
image.c
dlls/gdiplus/image.c
+61
-0
gdiplusgpstubs.h
include/gdiplusgpstubs.h
+2
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
1cca99dc
...
...
@@ -81,7 +81,7 @@
@ stdcall GdipCreateBitmapFromScan0(long long long long ptr ptr)
@ stdcall GdipCreateBitmapFromStream(ptr ptr)
@ stdcall GdipCreateBitmapFromStreamICM(ptr ptr)
@ st
ub GdipCreateCachedBitmap
@ st
dcall GdipCreateCachedBitmap(ptr ptr ptr)
@ stdcall GdipCreateCustomLineCap(ptr ptr long long ptr)
@ stub GdipCreateEffect
@ stdcall GdipCreateFont(ptr long long long ptr)
...
...
@@ -137,7 +137,7 @@
@ stdcall GdipCreateTextureIA(ptr ptr long long long long ptr)
@ stdcall GdipCreateTextureIAI(ptr ptr long long long long ptr)
@ stdcall GdipDeleteBrush(ptr)
@ st
ub GdipDeleteCachedBitmap
@ st
dcall GdipDeleteCachedBitmap(ptr)
@ stdcall GdipDeleteCustomLineCap(ptr)
@ stub GdipDeleteEffect
@ stdcall GdipDeleteFont(ptr)
...
...
@@ -158,7 +158,7 @@
@ stdcall GdipDrawBezierI(ptr ptr long long long long long long long long)
@ stdcall GdipDrawBeziers(ptr ptr ptr long)
@ stdcall GdipDrawBeziersI(ptr ptr ptr long)
@ st
ub GdipDrawCachedBitmap
@ st
dcall GdipDrawCachedBitmap(ptr ptr long long)
@ stdcall GdipDrawClosedCurve2(ptr ptr ptr long long)
@ stdcall GdipDrawClosedCurve2I(ptr ptr ptr long long)
@ stdcall GdipDrawClosedCurve(ptr ptr ptr long)
...
...
dlls/gdiplus/gdiplus_private.h
View file @
1cca99dc
...
...
@@ -195,6 +195,10 @@ struct GpBitmap{
BYTE
*
bitmapbits
;
/* pointer to the buffer we passed in BitmapLockBits */
};
struct
GpCachedBitmap
{
GpBitmap
*
bmp
;
};
struct
GpImageAttributes
{
WrapMode
wrap
;
};
...
...
dlls/gdiplus/image.c
View file @
1cca99dc
...
...
@@ -547,6 +547,67 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromStreamICM(IStream* stream,
return
GdipCreateBitmapFromStream
(
stream
,
bitmap
);
}
GpStatus
WINGDIPAPI
GdipCreateCachedBitmap
(
GpBitmap
*
bitmap
,
GpGraphics
*
graphics
,
GpCachedBitmap
**
cachedbmp
)
{
GpStatus
stat
;
GpImage
*
copy
;
TRACE
(
"%p %p %p
\n
"
,
bitmap
,
graphics
,
cachedbmp
);
if
(
!
bitmap
||
!
graphics
||
!
cachedbmp
)
return
InvalidParameter
;
*
cachedbmp
=
GdipAlloc
(
sizeof
(
GpCachedBitmap
));
if
(
!*
cachedbmp
)
return
OutOfMemory
;
(
*
cachedbmp
)
->
bmp
=
GdipAlloc
(
sizeof
(
GpBitmap
));
if
(
!
(
*
cachedbmp
)
->
bmp
){
GdipFree
(
*
cachedbmp
);
return
OutOfMemory
;
}
copy
=
&
(
*
cachedbmp
)
->
bmp
->
image
;
stat
=
GdipCloneImage
(
&
(
bitmap
->
image
),
&
copy
);
if
(
stat
!=
Ok
){
GdipFree
(
*
cachedbmp
);
return
stat
;
}
(
*
cachedbmp
)
->
bmp
->
width
=
bitmap
->
width
;
(
*
cachedbmp
)
->
bmp
->
height
=
bitmap
->
height
;
(
*
cachedbmp
)
->
bmp
->
format
=
bitmap
->
format
;
(
*
cachedbmp
)
->
bmp
->
lockmode
=
0
;
(
*
cachedbmp
)
->
bmp
->
numlocks
=
0
;
(
*
cachedbmp
)
->
bmp
->
bitmapbits
=
NULL
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipDeleteCachedBitmap
(
GpCachedBitmap
*
cachedbmp
)
{
TRACE
(
"%p
\n
"
,
cachedbmp
);
if
(
!
cachedbmp
)
return
InvalidParameter
;
GdipDisposeImage
(
&
cachedbmp
->
bmp
->
image
);
GdipFree
(
cachedbmp
->
bmp
);
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipDrawCachedBitmap
(
GpGraphics
*
graphics
,
GpCachedBitmap
*
cachedbmp
,
INT
x
,
INT
y
)
{
TRACE
(
"%p %p %d %d
\n
"
,
graphics
,
cachedbmp
,
x
,
y
);
if
(
!
graphics
||
!
cachedbmp
)
return
InvalidParameter
;
return
GdipDrawImage
(
graphics
,
&
cachedbmp
->
bmp
->
image
,
(
REAL
)
x
,
(
REAL
)
y
);
}
GpStatus
WINGDIPAPI
GdipDisposeImage
(
GpImage
*
image
)
{
HDC
hdc
;
...
...
include/gdiplusgpstubs.h
View file @
1cca99dc
...
...
@@ -32,6 +32,7 @@ class GpAdjustableArrowCap : public GpCustomLineCap {};
class
GpImage
{};
class
GpMetafile
:
public
GpImage
{};
class
GpImageAttributes
{};
class
GpCachedBitmap
{};
class
GpBitmap
:
public
GpImage
{};
class
GpPathGradient
:
public
GpBrush
{};
class
GpLineGradient
:
public
GpBrush
{};
...
...
@@ -57,6 +58,7 @@ typedef struct GpAdjustableArrowCap GpAdjustableArrowCap;
typedef
struct
GpImage
GpImage
;
typedef
struct
GpMetafile
GpMetafile
;
typedef
struct
GpImageAttributes
GpImageAttributes
;
typedef
struct
GpCachedBitmap
GpCachedBitmap
;
typedef
struct
GpBitmap
GpBitmap
;
typedef
struct
GpPathGradient
GpPathGradient
;
typedef
struct
GpLineGradient
GpLineGradient
;
...
...
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