[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/Xsharp Graphics.cs,1.6,1.7 Xlib.cs.i
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/Xsharp Graphics.cs,1.6,1.7 Xlib.cs.in,1.9,1.10 |
Date: |
Fri, 20 Jun 2003 19:28:30 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/Xsharp
In directory subversions:/tmp/cvs-serv6027/Xsharp
Modified Files:
Graphics.cs Xlib.cs.in
Log Message:
Implement some of the support code for dashed pens in Xsharp - not
100% working yet.
Index: Graphics.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Xsharp/Graphics.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** Graphics.cs 9 Jun 2003 22:15:09 -0000 1.6
--- Graphics.cs 20 Jun 2003 23:28:28 -0000 1.7
***************
*** 65,68 ****
--- 65,69 ----
private Pixmap tile;
private Bitmap stipple;
+ private byte[] dashPattern;
/// <summary>
***************
*** 564,567 ****
--- 565,609 ----
{
dpy.Unlock();
+ }
+ }
+ }
+
+ /// <summary>
+ /// <para>Get or set the dash pattern for line drawing.</para>
+ /// </summary>
+ ///
+ /// <value>
+ /// <para>The pattern to draw with. Alternating sizes for the
+ /// dashes and the gaps.</para>
+ /// </value>
+ ///
+ /// <exception cref="T:System.ArgumentNullException">
+ /// <para>Raised if the value is set to <see langword="null"/>.</para>
+ /// </exception>
+ public byte[] DashPattern
+ {
+ get
+ {
+ return dashPattern;
+ }
+ set
+ {
+ if(value == null)
+ {
+ throw new
ArgumentNullException("value");
+ }
+ if(value != dashPattern)
+ {
+ try
+ {
+ IntPtr display = Lock();
+ dashPattern = value;
+
Xlib.XSetDashes(display, gc, 0, dashPattern,
+
dashPattern.Length);
+ }
+ finally
+ {
+ dpy.Unlock();
+ }
}
}
Index: Xlib.cs.in
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Xsharp/Xlib.cs.in,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** Xlib.cs.in 14 Jun 2003 09:50:51 -0000 1.9
--- Xlib.cs.in 20 Jun 2003 23:28:28 -0000 1.10
***************
*** 359,362 ****
--- 359,367 ----
[DllImport("X11")]
+ extern public static @X_int@ XSetDashes
+ (IntPtr display, IntPtr gc, @X_int@ dash_offset,
+ byte[] dash_list, @X_int@ n);
+
+ [DllImport("X11")]
extern public static @X_int@ XDrawLine
(IntPtr display, Drawable drawable, IntPtr gc,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/Xsharp Graphics.cs,1.6,1.7 Xlib.cs.in,1.9,1.10,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Drawing.Xsharp DrawingPen.cs,1.2,1.3
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms StatusBar.cs,NONE,1.1 StatusBarPanelCollection.cs,NONE,1.1 StatusBarPanel.cs,1.1,1.2
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Drawing.Xsharp DrawingPen.cs,1.2,1.3
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms StatusBar.cs,NONE,1.1 StatusBarPanelCollection.cs,NONE,1.1 StatusBarPanel.cs,1.1,1.2
- Index(es):