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
e48524ce
Commit
e48524ce
authored
Aug 28, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Aug 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add and use an HBITMAP field in GpBitmap objects.
parent
b99abe2e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
brush.c
dlls/gdiplus/brush.c
+1
-1
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-0
image.c
dlls/gdiplus/image.c
+8
-5
No files found.
dlls/gdiplus/brush.c
View file @
e48524ce
...
...
@@ -670,7 +670,7 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image,
n_y
+
n_height
>
((
GpBitmap
*
)
image
)
->
height
)
return
InvalidParameter
;
IPicture_get_Handle
(
image
->
picture
,
(
OLE_HANDLE
*
)
&
hbm
)
;
hbm
=
((
GpBitmap
*
)
image
)
->
hbitmap
;
if
(
!
hbm
)
return
GenericError
;
IPicture_get_CurDC
(
image
->
picture
,
&
hdc
);
bm_is_selected
=
(
hdc
!=
0
);
...
...
dlls/gdiplus/gdiplus_private.h
View file @
e48524ce
...
...
@@ -222,6 +222,7 @@ struct GpBitmap{
ImageLockMode
lockmode
;
INT
numlocks
;
BYTE
*
bitmapbits
;
/* pointer to the buffer we passed in BitmapLockBits */
HBITMAP
hbitmap
;
};
struct
GpCachedBitmap
{
...
...
dlls/gdiplus/image.c
View file @
e48524ce
...
...
@@ -167,7 +167,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect,
if
(
bitmap
->
lockmode
)
return
WrongState
;
IPicture_get_Handle
(
bitmap
->
image
.
picture
,
(
OLE_HANDLE
*
)
&
hbm
)
;
hbm
=
bitmap
->
hbitmap
;
IPicture_get_CurDC
(
bitmap
->
image
.
picture
,
&
hdc
);
bm_is_selected
=
(
hdc
!=
0
);
...
...
@@ -263,7 +263,7 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap,
return
Ok
;
}
IPicture_get_Handle
(
bitmap
->
image
.
picture
,
(
OLE_HANDLE
*
)
&
hbm
)
;
hbm
=
bitmap
->
hbitmap
;
IPicture_get_CurDC
(
bitmap
->
image
.
picture
,
&
hdc
);
bm_is_selected
=
(
hdc
!=
0
);
...
...
@@ -587,6 +587,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON hicon, GpBitmap** bitmap)
(
*
bitmap
)
->
image
.
flags
=
ImageFlagsNone
;
(
*
bitmap
)
->
width
=
ipicture_pixel_width
((
*
bitmap
)
->
image
.
picture
);
(
*
bitmap
)
->
height
=
ipicture_pixel_height
((
*
bitmap
)
->
image
.
picture
);
(
*
bitmap
)
->
hbitmap
=
NULL
;
DeleteObject
(
iinfo
.
hbmColor
);
DeleteObject
(
iinfo
.
hbmMask
);
...
...
@@ -687,6 +688,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride,
(
*
bitmap
)
->
width
=
width
;
(
*
bitmap
)
->
height
=
height
;
(
*
bitmap
)
->
format
=
format
;
IPicture_get_Handle
((
*
bitmap
)
->
image
.
picture
,
(
OLE_HANDLE
*
)
&
(
*
bitmap
)
->
hbitmap
);
return
Ok
;
}
...
...
@@ -1261,6 +1263,8 @@ static GpStatus decode_image_olepicture_bitmap(IStream* stream, REFCLSID clsid,
IPicture_get_Handle
(
pic
,
(
OLE_HANDLE
*
)
&
hbm
);
IPicture_get_CurDC
(
pic
,
&
hdc
);
(
*
((
GpBitmap
**
)
image
))
->
hbitmap
=
hbm
;
bmch
=
(
BITMAPCOREHEADER
*
)
(
&
pbmi
->
bmiHeader
);
bmch
->
bcSize
=
sizeof
(
BITMAPCOREHEADER
);
...
...
@@ -1576,9 +1580,8 @@ GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage *image, IStream* stream,
if
(
encode_image
==
NULL
)
return
UnknownImageFormat
;
/* extract underlying hbitmap representation from the IPicture */
hr
=
IPicture_get_Handle
(
image
->
picture
,
(
OLE_HANDLE
*
)
&
hbmp
);
if
(
FAILED
(
hr
)
||
!
hbmp
)
hbmp
=
((
GpBitmap
*
)
image
)
->
hbitmap
;
if
(
!
hbmp
)
return
GenericError
;
hr
=
IPicture_get_CurDC
(
image
->
picture
,
&
hdc
);
if
(
FAILED
(
hr
))
...
...
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