[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] pnetlib/System.Drawing.Xsharp DrawingGraphics.cs,
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] pnetlib/System.Drawing.Xsharp DrawingGraphics.cs, 1.12, 1.13 DrawingImage.cs, 1.1, 1.2 |
Date: |
Thu, 02 Oct 2003 04:00:40 +0000 |
Update of /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp
In directory subversions:/tmp/cvs-serv11737/System.Drawing.Xsharp
Modified Files:
DrawingGraphics.cs DrawingImage.cs
Log Message:
Hook the new image code into "System.Drawing.Image" and "System.Drawing.Xsharp".
Index: DrawingGraphics.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp/DrawingGraphics.cs,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** DrawingGraphics.cs 27 Sep 2003 02:44:17 -0000 1.12
--- DrawingGraphics.cs 2 Oct 2003 04:00:38 -0000 1.13
***************
*** 299,305 ****
public override void DrawImage(IToolkitImage image, int x, int y)
! {
! graphics.DrawImage(x, y, (image as
DrawingImage).GetNativeImage());
! }
}; // class DrawingGraphics
--- 299,309 ----
public override void DrawImage(IToolkitImage image, int x, int y)
! {
! Xsharp.Image ximage = (image as
DrawingImage).GetNativeImage();
! if(ximage != null)
! {
! graphics.DrawImage(x, y, ximage);
! }
! }
}; // class DrawingGraphics
Index: DrawingImage.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp/DrawingImage.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DrawingImage.cs 28 Aug 2003 13:30:06 -0000 1.1
--- DrawingImage.cs 2 Oct 2003 04:00:38 -0000 1.2
***************
*** 22,48 ****
{
! using System;
! using DotGNU.Images;
! public class DrawingImage : IToolkitImage
! {
! Xsharp.Image image;
! public DrawingImage(Xsharp.Screen screen, DotGNU.Images.Image
image)
! {
! // TODO: What about other frames?
! // What screen to use?
! this.image = new Xsharp.Image(screen, image.Width,
image.Height,
! image.GetFrame(0).Data, image.GetFrame(0).Mask);
! }
! public void Dispose()
! {
! image.Destroy();
! }
! public Xsharp.Image GetNativeImage()
! {
! return image;
! }
! }
! }
--- 22,57 ----
{
! using System;
! using Xsharp;
! using DotGNU.Images;
! public class DrawingImage : IToolkitImage
! {
! // Internal state.
! private Xsharp.Image image;
! // Constructor.
! public DrawingImage(Screen screen, DotGNU.Images.Image image)
! {
! this.image = new Xsharp.Image(screen,
image.GetFrame(0));
! }
! // Dispose of this image.
! public void Dispose()
! {
! if(image != null)
! {
! image.Destroy();
! image = null;
! }
! }
!
! // Get the native Xsharp image structure, for drawing purposes.
! public Xsharp.Image GetNativeImage()
! {
! return image;
! }
!
! }; // class DrawingImage
!
! }; // namespace System.Drawing.Toolkit
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] pnetlib/System.Drawing.Xsharp DrawingGraphics.cs, 1.12, 1.13 DrawingImage.cs, 1.1, 1.2,
Rhys Weatherley <address@hidden> <=