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

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

[Dotgnu-pnet-commits] CVS: pnetlib/System.Drawing.Xsharp DrawingGraphic


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/System.Drawing.Xsharp DrawingGraphics.cs,1.2,1.3 DrawingPen.cs,1.1,1.2
Date: Wed, 11 Jun 2003 22:55:51 -0400

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

Modified Files:
        DrawingGraphics.cs DrawingPen.cs 
Log Message:


Implement the "ButtonBase" and "Button" classes, to provide simple
control functionality.


Index: DrawingGraphics.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp/DrawingGraphics.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** DrawingGraphics.cs  9 Jun 2003 21:25:37 -0000       1.2
--- DrawingGraphics.cs  12 Jun 2003 02:55:48 -0000      1.3
***************
*** 167,171 ****
                                (String s, System.Drawing.Point[] 
layoutRectangle,
                                 StringFormat format, out int charactersFitted,
!                                out int linesFilled)
                        {
                                // TODO: line wrapping, etc
--- 167,171 ----
                                (String s, System.Drawing.Point[] 
layoutRectangle,
                                 StringFormat format, out int charactersFitted,
!                                out int linesFilled, bool ascentOnly)
                        {
                                // TODO: line wrapping, etc
***************
*** 173,177 ****
                                graphics.MeasureString
                                        (s, font, out width, out ascent, out 
descent);
!                               return new Size(width, ascent + descent);
                        }
  
--- 173,184 ----
                                graphics.MeasureString
                                        (s, font, out width, out ascent, out 
descent);
!                               if(!ascentOnly)
!                               {
!                                       return new Size(width, ascent + 
descent);
!                               }
!                               else
!                               {
!                                       return new Size(width, ascent);
!                               }
                        }
  

Index: DrawingPen.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Xsharp/DrawingPen.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** DrawingPen.cs       7 Jun 2003 22:40:58 -0000       1.1
--- DrawingPen.cs       12 Jun 2003 02:55:48 -0000      1.2
***************
*** 57,69 ****
  
        // Map the cap style from "System.Drawing" to "Xsharp".
!       private static CapStyle MapCapStyle(DashCap style)
                        {
                                switch(style)
                                {
!                                       case DashCap.Flat:
!                                       case DashCap.Triangle:
!                                       default:
                                                return CapStyle.CapButt;
!                                       case DashCap.Round:
                                                return CapStyle.CapRound;
                                }
--- 57,70 ----
  
        // Map the cap style from "System.Drawing" to "Xsharp".
!       private static CapStyle MapCapStyle(LineCap style)
                        {
                                switch(style)
                                {
!                                       case LineCap.Square:
!                                               return CapStyle.CapProjecting;
!                                       case LineCap.Flat:
                                                return CapStyle.CapButt;
!                                       case LineCap.Round:
!                                       default:
                                                return CapStyle.CapRound;
                                }
***************
*** 95,99 ****
                                        g.LineWidth = (int)(properties.Width);
                                        g.LineStyle = 
MapLineStyle(properties.DashStyle);
!                                       g.CapStyle = 
MapCapStyle(properties.DashCap);
                                        g.JoinStyle = 
MapJoinStyle(properties.LineJoin);
                                        g.Foreground = 
DrawingToolkit.DrawingToXColor
--- 96,100 ----
                                        g.LineWidth = (int)(properties.Width);
                                        g.LineStyle = 
MapLineStyle(properties.DashStyle);
!                                       g.CapStyle = 
MapCapStyle(properties.EndCap);
                                        g.JoinStyle = 
MapJoinStyle(properties.LineJoin);
                                        g.Foreground = 
DrawingToolkit.DrawingToXColor





reply via email to

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