-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow GpGraphics to take ownership of GpMetafile on dispose
The Windows GDI+ allows the metafile instance to be disposed before the graphics instance. To support that, keep track in the GpGraphics of whether it is responsible for freeing the GpMetafile. If the graphics instance is deleted first, own_metafile is FALSE and nothing happens. If the metafile instance is disposed first, set own_metafile to TRUE and don't dispose of the metafile. It will be disposed when the graphics instance is deleted. --- Also on Windows GDI+ creating more than one graphics instance for a metafile instance throws an OutOfMemoryException, so do the same in GdipGetImageGraphicsContext
- Loading branch information
1 parent
9efff6a
commit 1af55cd
Showing
5 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters