-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements over Image, Bitmap and Icon classes (#9)
* fix test name * redefine Image class based on SKBitmap and add missing props/methods; Image class will be the base class of Bitmap class * make Bitmap inherit from Image class and add missing props/methods * init HorizontalResolution/VerticalResolution props with default resolution * add missing props/methods in Icon class according to new defintiion of Bitmap class * take the largest icon by default (and not the lowest) as System.Drawing does; fix constructor by copy * add test for Bitmap.MakeTransparent method * fix Icon.ExtractAssociatedIcon to take the largest icon * fix ExtractIcon to consider size prior to index * add ExtractIcon test cases * implement Image.GetBounds, add GraphicsUnit enum * fix typo in Color.Transparent * add ImageLockMode enum * add PixelFormat enum; implement PixelFormat in Bitmap/Image classes * add RotateFlipType enum, implement Image.RotateFlip method * remove unused parameter from ToPixelFormat * add ImageFlags enum, add Image.Flags basic implementation * minor fix on PixelFormat property's summary * mark Bitmap.SetResolution as not supported * add Image.GetThumbnailImage * add ColorPalette class, implement Image.Palette property * minor improvement * add image test cases * fix Dispose pattern * make Bitmap/Icon sealed * Fix typo. * Fix summary open tag declaration * Rename properties to match naming convention. * define Image as abstract * remove Bitmap destructor (aleady defined in Image class) * remove CreateInstance method (just use Bitmap constructor) * add using directive for temp Image instances * simplify SKRect to SKRectI * Define GetResourceStream in Image class (instead of Bitmap class) * fix Bitmap(Type,string) description * define Svg class, remove SKBitmap references from Image class and use them on Bitmap class * define SV as sealed * Rename m_Image to InnerImage for property naming consistency. --------- Co-authored-by: Fede Azzato <fedeazzato@gmail.com>
- Loading branch information
1 parent
2deea97
commit 065e57b
Showing
13 changed files
with
1,421 additions
and
123 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
namespace GeneXus.Drawing; | ||
|
||
/// <summary> | ||
/// Specifies the unit of measure for the given data. | ||
/// </summary> | ||
public enum GraphicsUnit | ||
{ | ||
/// <summary> | ||
/// Specifies the world unit as the unit of measure. | ||
/// </summary> | ||
World = 0, | ||
|
||
/// <summary> | ||
/// Specifies 1/75 inch as the unit of measure. | ||
/// </summary> | ||
Display = 1, | ||
|
||
/// <summary> | ||
/// Specifies a device pixel as the unit of measure. | ||
/// </summary> | ||
Pixel = 2, | ||
|
||
/// <summary> | ||
/// Specifies a printer's point (1/72 inch) as the unit of measure. | ||
/// </summary> | ||
Point = 3, | ||
|
||
/// <summary> | ||
/// Specifies the inch as the unit of measure. | ||
/// </summary> | ||
Inch = 4, | ||
|
||
/// <summary> | ||
/// Specifies the document unit (1/300 inch) as the unit of measure. | ||
/// </summary> | ||
Document = 5, | ||
|
||
/// <summary> | ||
/// Specifies the millimeter as the unit of measure. | ||
/// </summary> | ||
Millimeter = 6 | ||
} |
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
Oops, something went wrong.