diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-05-07 08:12:56 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-05-07 08:12:56 +0200 |
| commit | 6b02331dfe7c6d8290c136ce20b4a7c655b47aae (patch) | |
| tree | da414ee19018edaf1d37b8fd7a6e4fe1f86edecd /src/BmpPicture.cs | |
| parent | f3344a78e511213d235e4c91bf507264fd41ac0d (diff) | |
first tests with vkvg as backendvkvg
Diffstat (limited to 'src/BmpPicture.cs')
| -rw-r--r-- | src/BmpPicture.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/BmpPicture.cs b/src/BmpPicture.cs index e3af9c79..a549f339 100644 --- a/src/BmpPicture.cs +++ b/src/BmpPicture.cs @@ -26,7 +26,7 @@ using System; using System.IO; -using Cairo; +using vkvg; namespace Crow { @@ -110,14 +110,13 @@ namespace Crow widthRatio = heightRatio; } - using (ImageSurface tmp = new ImageSurface (Format.Argb32, bounds.Width, bounds.Height)) { + using (Surface tmp = new Surface (CrowApplication.dev, bounds.Width, bounds.Height)) { using (Context gr = new Context (tmp)) { gr.Translate (bounds.Left, bounds.Top); gr.Scale (widthRatio, heightRatio); gr.Translate ((bounds.Width/widthRatio - Dimensions.Width)/2, (bounds.Height/heightRatio - Dimensions.Height)/2); - using (ImageSurface imgSurf = new ImageSurface (image, Format.Argb32, - Dimensions.Width, Dimensions.Height, 4 * Dimensions.Width)) { + using (Surface imgSurf = new Surface (CrowApplication.dev, ref image, Dimensions.Width, Dimensions.Height)) { gr.SetSourceSurface (imgSurf, 0,0); gr.Paint (); } @@ -157,8 +156,7 @@ namespace Crow gr.Scale (widthRatio, heightRatio); gr.Translate ((rect.Width/widthRatio - Dimensions.Width)/2, (rect.Height/heightRatio - Dimensions.Height)/2); - using (ImageSurface imgSurf = new ImageSurface (image, Format.Argb32, - Dimensions.Width, Dimensions.Height, 4 * Dimensions.Width)) { + using (Surface imgSurf = new Surface (CrowApplication.dev, ref image, Dimensions.Width, Dimensions.Height)) { gr.SetSourceSurface (imgSurf, 0,0); gr.Paint (); } |