dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] pnetlib/System.Drawing.Xsharp DrawingTextureBrush.


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] pnetlib/System.Drawing.Xsharp DrawingTextureBrush.cs, 1.1, 1.2 DrawingToolkit.cs, 1.18, 1.19
Date: Thu, 20 Nov 2003 02:11:49 +0000

Update of /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp
In directory subversions:/tmp/cvs-serv1580/System.Drawing.Xsharp

Modified Files:
        DrawingTextureBrush.cs DrawingToolkit.cs 
Log Message:


Implement texture brushes in "System.Drawing.Xsharp".


Index: DrawingToolkit.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp/DrawingToolkit.cs,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** DrawingToolkit.cs   2 Nov 2003 22:22:07 -0000       1.18
--- DrawingToolkit.cs   20 Nov 2003 02:11:47 -0000      1.19
***************
*** 262,269 ****
        // Create a texture brush.
        public IToolkitBrush CreateTextureBrush
!                               (TextureBrush properties, RectangleF dstRect,
!                                ImageAttributes imageAttr)
                        {
!                               return new DrawingTextureBrush(properties, 
dstRect, imageAttr);
                        }
  
--- 262,270 ----
        // Create a texture brush.
        public IToolkitBrush CreateTextureBrush
!                               (TextureBrush properties, IToolkitImage image,
!                                RectangleF dstRect, ImageAttributes imageAttr)
                        {
!                               return new DrawingTextureBrush
!                                       (properties, image as DrawingImage, 
dstRect, imageAttr);
                        }
  

Index: DrawingTextureBrush.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp/DrawingTextureBrush.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DrawingTextureBrush.cs      9 Jun 2003 21:25:37 -0000       1.1
--- DrawingTextureBrush.cs      20 Nov 2003 02:11:47 -0000      1.2
***************
*** 33,36 ****
--- 33,37 ----
        // Internal state.
        private TextureBrush properties;
+       private DrawingImage image;
        private RectangleF dstRect;
        private ImageAttributes imageAttr;
***************
*** 38,45 ****
--- 39,48 ----
        // Constructor.
        public DrawingTextureBrush(TextureBrush properties,
+                                                          DrawingImage image,
                                                           RectangleF dstRect,
                                                           ImageAttributes 
imageAttr)
                        {
                                this.properties = properties;
+                               this.image = image;
                                this.dstRect = dstRect;
                                this.imageAttr = imageAttr;
***************
*** 50,56 ****
                        {
                                DrawingGraphics graphics = (_graphics as 
DrawingGraphics);
!                               if(graphics != null)
                                {
!                                       // TODO
                                }
                        }
--- 53,62 ----
                        {
                                DrawingGraphics graphics = (_graphics as 
DrawingGraphics);
!                               if(graphics != null && image != null)
                                {
!                                       Xsharp.Graphics g = graphics.graphics;
!                                       Xsharp.Image nativeImage = 
image.GetNativeImage();
!                                       g.SetFillTiled(nativeImage.Pixmap,
!                                                                  
(int)(dstRect.X), (int)(dstRect.Y));
                                }
                        }
***************
*** 59,63 ****
        public void Dispose()
                        {
!                               // Nothing to do here in this implementation.
                        }
  
--- 65,73 ----
        public void Dispose()
                        {
!                               if(image != null)
!                               {
!                                       image.Dispose();
!                                       image = null;
!                               }
                        }
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]