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/Toolkit IToolkit.cs,1


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/System.Drawing/Toolkit IToolkit.cs,1.1,1.2 IToolkitFont.cs,1.1,1.2 IToolkitGraphics.cs,1.1,1.2 ToolkitGraphicsBase.cs,1.1,1.2
Date: Mon, 09 Jun 2003 17:25:40 -0400

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

Modified Files:
        IToolkit.cs IToolkitFont.cs IToolkitGraphics.cs 
        ToolkitGraphicsBase.cs 
Log Message:


Font management; texture brushes; some type converters;
system brushes and pens.


Index: IToolkit.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Drawing/Toolkit/IToolkit.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** IToolkit.cs 7 Jun 2003 22:40:58 -0000       1.1
--- IToolkit.cs 9 Jun 2003 21:25:37 -0000       1.2
***************
*** 23,26 ****
--- 23,28 ----
  
  using System.Drawing.Drawing2D;
+ using System.Drawing.Imaging;
+ using System.Drawing.Text;
  
  public interface IToolkit
***************
*** 59,62 ****
--- 61,69 ----
                         float angle, bool isAngleScaleable);
  
+       // Create a texture brush.
+       IToolkitBrush CreateTextureBrush
+                               (TextureBrush properties, RectangleF dstRect,
+                                ImageAttributes imageAttr);
+ 
        // Create a toolkit pen from the properties in the specified object.
        // If the toolkit does not support the precise combination of pen
***************
*** 85,88 ****
--- 92,120 ----
        IToolkitWindow CreateChildWindow(IToolkitWindow parent,
                                                                         int x, 
int y, int width, int height);
+ 
+       // Get a list of all font families on this system, or all font
+       // families that are compatible with a particular IToolkitGraphics.
+       FontFamily[] GetFontFamilies(IToolkitGraphics graphics);
+ 
+       // Get font family metric information.
+       void GetFontFamilyMetrics(GenericFontFamilies genericFamily,
+                                                         String name, 
FontStyle style,
+                                                         out int ascent, out 
int descent,
+                                                         out int emHeight, out 
int lineSpacing);
+ 
+       // Get the IToolkitFont that corresponds to a hdc's current font.
+       // Returns null if there is no way to obtain the information.
+       IToolkitFont GetFontFromHdc(IntPtr hdc);
+ 
+       // Get the IToolkitFont that corresponds to a native font object.
+       // Returns null if there is no way to obtain the information.
+       IToolkitFont GetFontFromHfont(IntPtr hfont);
+ 
+       // Get the IToolkitFont that corresponds to LOGFONT information.
+       // Returns null if there is no way to obtain the information.
+       IToolkitFont GetFontFromLogFont(Object lf, IntPtr hdc);
+ 
+       // Get the default IToolkitGraphics object to measure screen sizes.
+       IToolkitGraphics GetDefaultGraphics();
  
  }; // interface IToolkit

Index: IToolkitFont.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Drawing/Toolkit/IToolkitFont.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** IToolkitFont.cs     7 Jun 2003 22:40:58 -0000       1.1
--- IToolkitFont.cs     9 Jun 2003 21:25:37 -0000       1.2
***************
*** 25,28 ****
--- 25,34 ----
  public interface IToolkitFont : IToolkitSelectObject
  {
+       // Get the raw HFONT for this toolkit font.  IntPtr.Zero if none.
+       IntPtr GetHfont();
+ 
+       // Get the LOGFONT information for this toolkit font.
+       void ToLogFont(Object lf, IToolkitGraphics graphics);
+ 
  }; // interface IToolkitFont
  

Index: IToolkitGraphics.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/System.Drawing/Toolkit/IToolkitGraphics.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** IToolkitGraphics.cs 7 Jun 2003 22:40:58 -0000       1.1
--- IToolkitGraphics.cs 9 Jun 2003 21:25:37 -0000       1.2
***************
*** 80,83 ****
--- 80,95 ----
                                   int numberOfSegments, float tension);
  
+       // Draw a string using the current font and brush.
+       void DrawString(String s, int x, int y, StringFormat format);
+ 
+       // Draw a string using the current font and brush within a
+       // layout rectangle that is defined by four points.
+       void DrawString(String s, Point[] layoutRectangle, StringFormat format);
+ 
+       // Measure a string using the current font and a given layout rectangle.
+       Size MeasureString(String s, Point[] layoutRectangle,
+                                          StringFormat format, out int 
charactersFitted,
+                                          out int linesFilled);
+ 
        // Flush the graphics subsystem
        void Flush(FlushIntention intention);
***************
*** 109,112 ****
--- 121,127 ----
        // Set the clipping region to a complex mask.  TODO
        void SetClipMask(Object mask, int topx, int topy);
+ 
+       // Get the line spacing for the font selected into this graphics object.
+       int GetLineSpacing();
  
  }; // interface IToolkitGraphics

Index: ToolkitGraphicsBase.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/System.Drawing/Toolkit/ToolkitGraphicsBase.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** ToolkitGraphicsBase.cs      7 Jun 2003 22:40:58 -0000       1.1
--- ToolkitGraphicsBase.cs      9 Jun 2003 21:25:37 -0000       1.2
***************
*** 118,123 ****
                                get
                                {
!                                       // Assume a display with a default DPI 
of 75.
!                                       return 75.0f;
                                }
                        }
--- 118,122 ----
                                get
                                {
!                                       return Graphics.DefaultScreenDpi;
                                }
                        }
***************
*** 126,131 ****
                                get
                                {
!                                       // Assume a display with a default DPI 
of 75.
!                                       return 75.0f;
                                }
                        }
--- 125,129 ----
                                get
                                {
!                                       return Graphics.DefaultScreenDpi;
                                }
                        }
***************
*** 317,320 ****
--- 315,337 ----
                        }
  
+       // Draw a string using the current font and brush.
+       public abstract void DrawString
+                               (String s, int x, int y, StringFormat format);
+ 
+       // Draw a string using the current font and brush within a
+       // layout rectangle that is defined by four points.
+       public virtual void DrawString
+                               (String s, Point[] layoutRectangle, 
StringFormat format)
+                       {
+                               // TODO: implement a default string draw, 
laying out
+                               // the text within the specified rectangle.
+                       }
+ 
+       // Measure a string using the current font and a given layout rectangle.
+       public abstract Size MeasureString
+                               (String s, Point[] layoutRectangle,
+                                StringFormat format, out int charactersFitted,
+                                out int linesFilled);
+ 
        // Flush the graphics subsystem
        public virtual void Flush(FlushIntention intention)
***************
*** 363,366 ****
--- 380,386 ----
        // Set the clipping region to a complex mask.
        public abstract void SetClipMask(Object mask, int topx, int topy);
+ 
+       // Get the line spacing for the font selected into this graphics object.
+       public abstract int GetLineSpacing();
  
  }; // class ToolkitGraphicsBase





reply via email to

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