[Top][All Lists]

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


From: Simon Guindon
Subject: Re: [DotGNU]SWF
Date: Tue, 2 Sep 2003 13:40:37 -0400

Umm something is wrong there, The drawing code you have there, is whats in CVS currently, before my patch.  My patch should get rid of that totally and put in the new drawing code.  It works for me, I get a fresh CVS off savannah, brand new checkout, apply my patch, and the new drawing code is applied.
I'm not too sure about how the patch files work, but I opened up my patch file in a text editor, and it looks like it lists the old version, and the new version, for instance, the start of the patch file has all the not implemented exceptions, then further down, it has all the new code, which replaces much of that, and later on, for DefaultThemePainter, it shows the old code, then further down the new code.
The new code starts at this line:

--- 960,1012 ----

! // draw the button border

! DrawButton(graphics, x, y, width, height, state, Color.Black, SystemColors.Control, false);

! x += 2; // skip border

! y += 2; // skip border

! width -= 4; // skip border

! height -= 4; // skip border

! if ((state & ButtonState.Pushed) == 0)

! {

! // the center calculation is off by one

! // so if we don't need "click shift"

! // then minus one from our x and y

! // offsets instead of adding one

! //

! // TODO: "click shift" should probably

! // be set via a protected field or

! // property so themes which don't have

! // it can more easily use this as a base

! x -= 1;

! y -= 1;

! }


! // setup the glyph shape

! int glyphWidth = 3;

! int glyphHeight = 3;

! glyphWidth *= 2;


! Point[] glyph = new Point[3];

! int offsetX = x+((width-glyphWidth)/2);

! int offsetY = y+((height-glyphHeight)/2);


! glyph[0] = new Point(offsetX, offsetY);

! glyph[1] = new Point(offsetX+6, offsetY);

! glyph[2] = new Point(offsetX+3, offsetY+3);


! // draw the arrow

! Color color = Color.Black;

! if ((state & ButtonState.Inactive) != 0)

! {

! color = ControlPaint.Light(color);

! }

! using (Brush brush = new SolidBrush(color))

! {

! graphics.FillPolygon(brush,glyph);

! }

! using (Pen pen = new Pen(color))

! {

! graphics.DrawPolygon(pen,glyph);



I'm not sure what the problem is because if I checkout a brand new cvs it patches fine for me, as long as I patch from the pnetlib dir, and not in System.Windows.Forms dir.

----- Original Message -----
From: Neil Cawse
Sent: Tuesday, September 02, 2003 1:02 PM
Subject: RE: [DotGNU]SWF

I checked your patch on Savanna again:


--- System.Windows.Forms/Themes/DefaultThemePainter.cs       28 Aug 2003 20:39:38 -0000
*** 960,981 ****
                                                                     int width, int height,
                                                                         ButtonState state)
!                              Brush brush = new SolidBrush(Color.White);
!                              ControlPaint.DrawBorder3D(graphics, x, y, width, height, Border3DStyle.Sunken, Border3DSide.All);
!                              graphics.FillRectangle(brush, x + 2, y + 2, width - 2, height - 2);
!                              brush.Dispose();
!                              if (state == ButtonState.Checked)
!                              {
!                                     Brush blackBrush = new SolidBrush(Color.Black);
!                                     Pen pen = new Pen(blackBrush, 2);
!                                     GraphicsPath path = new GraphicsPath();
!                                     path.AddLine(x + 3, y + 5, x + 4, y + 7);
!                                     path.AddLine(x + 5, y + 8, x + 9, y + 3);
!                                     graphics.DrawPath(pen, path);
!                                     brush.Dispose();
!                                     pen.Dispose();

this patch cant be the one that rendered the image link you posted?? Path.AddLine and graphics.DrawPath will produce an outline of the arrow, not the filled arrow.


Anyway i took the rest of your patch, changed the way you were handling onMouseUp (mouse up is when the mouse button is released, not when the button goes up), you just need to handle the OnMouseDown event and toggle the popup. There were some other changes, do a diff..




-----Original Message-----
From: Simon Guindon [mailto:address@hidden
Sent: Monday, September 01, 2003 11:06 PM
To: Portable.NET
Subject: Re: [DotGNU]SWF


StatusBar and CheckBox should be working on my part, not fully complete but I've implemented the basics first, until I figure out what to do with some of the advanced methods, but they should both work.  Need to fix up a few little things here and there.


Neil, you mentioned something about my ComboBox patch not working? it worked for me fine off fresh CVS, I patch using

patch -p0 < simon-etc.patch in the pnetlib root.  It should patch ComboBox.cs and DefaultThemePainter.cs


Take care,


----- Original Message -----

From: Neil Cawse

Sent: Monday, September 01, 2003 10:05 PM

Subject: [DotGNU]SWF


Thanks for the interest! We are all operating this pretty much informally - pick something, stub it out, get the very basics onto the cvs and build from there. If you are actively involved in an area, send to the mailing list and tell people. It wont guarantee that someone doesnt compete - but someone wont if you are making progress. Also - ASK QUESTIONS, we are here to help. I would be really happy getting anyone started, and we dont want people stuck on things.


I have approximately ranked each of the groups of work according to my valuation of importance.

The ranking is based on pieces that need to be completed for other pieces and how quickly System.Windows.Forms will become real world useful. Don't take them completely as gospel though.


I will add this to the Wiki. Anyone feel free to add/move around.



Toolkits : adding image support including icons. Rhys is working hard on this, images in X are v. trickey !

System.Drawing.Drawing2D : Linear Gradient Brush. Neil or someone else can add this in easily once images are done. This will allow some cool drawing effects.

System.Drawing.Imaging : Images, jpg, png, gif, scaling, rotation, transforming. jpg, png, gif support is v. tricky. Rhys is working on this. We could use SWT code, move this across from Java. Something to consider. The only thing that is key for us to get going is bmp support (easiest)

System.Windows.Forms : ListBox/CheckedListBox

System.Windows.Forms : Finish ComboBox

System.Windows.Forms : Finish H&VScrollbar - looks like speed issue and some functionality

System.Windows.Forms : ImageList - needed so apps can use images

System.Windows.Forms : ToolBar finish

Toolkits : Dialog support

System.Windows.Forms : Control - finish keyboard support, dialog support. Little tricky - Neil or Rhys

System.Windows.Forms : Open/Save/Folder/Font/Color/Print Common Dialogs - will need some toolkit pieces for the harder common dialogs like font. These are *very* cool to do.

System.Windows.Forms : MessageBoxes - needs images and dialog

System.Windows.Forms : DataGrid

System.Windows.Forms : Treeview - Neil working on initial version

System.Windows.Forms : TextBox - add scrollbar support

System.Drawing.Drawing2D : Pen Styles (cap, dash style etc.)

System.Windows.Forms : MainMenu - finish off, multiple colums, short cut keys, images, keyboard

System.Windows.Forms : ListView

System.Windows.Forms : DateTimePicker

System.Windows.Forms : MonthCalendar

System.Windows.Forms : Splitter

System.Windows.Forms : TrackBar

System.Windows.Forms : StatusBar

System.Windows.Forms : Finish TabControl - left, bottom and right tabs

Toolkits : Improved Font support

Toolkits : System colors and other system info

Toolkits : toolkit support for maximizing, minimizing and events

System.Windows.Forms.Form : finish hooking in minimize etc, keyboard and other pieces



Toolkits : Work on optimizing X

System.Windows.Forms : Richtextbox - difficult!

System.Windows.Forms : DomainUpDown

System.Windows.Forms : NumericUpDown

System.Windows.Forms : HelpProvider

System.Windows.Forms : ToolTip

System.Windows.Forms : NotifyIcon

System.Windows.Forms : PrintDocument/Print Preview/PageSetup

System.Windows.Forms : Theme support - XP, Gnome, KDE

System.Windows.Forms : ErrorProvider

System.Drawing.Regions : support Graphics paths

System.Drawing.Graphics : Optimize Draw and Measure String to minimize X trips for speed

System.Drawing.Graphics : Metafile support

reply via email to

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