If you are looking at it on the desktop it is because Basic4ppc doesn't get the desktop client area the correct size. This is a long-standing bug that (I hope) Erel will fix with the next release.
Gradient fill for circle is a nice idea but I'm afraid it is not supported on the device. It is possible on the desktop so I might look at putting it in my GDI+Desktop library.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Gradient fill for circle is a nice idea but I'm afraid it is not supported on the device. It is possible on the desktop so I might look at putting it in my GDI+Desktop library.
I see. It's a known bug.....
I simulated it by changing radius and Fill color of the circle consecutively and it worked on device...
The attached modified library will draw a gradient circle on desktop and device.
Make a penEx and DrawerEx objects.
Code:
Sub App_Start Form1.Show pen.New1(cBlack) dr.New1("form1",False) dr.GradientCircle(100,100,50,cYellow,cBlue) dr.drawCircle(pen.Value,100,100,50) End Sub
__________________
David Erez
Ramat Hasharon, Israel
If you are going to take my source codes, change them, recompile them and then publish them you might at least have the courtesy to change the names to avoid confusion and to also publish the amended source as well!
There are certain conventions usually observed when making use of other peoples intellectual property.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Agraham
Never meant to steal your property or to try to make it look as if I made it.
As I have only recently started to work with libraries, I can only dream on writing such a library.
I thought I made it clear that it is not my library by adding a post here (not as a new thread) and with this
Quote:
The attached modified library
I'm sorry that it looked foul to you.
I didn't add the source because I didn't want it to replace your library, just to help seongjin.
Here is the piece of code I added, you can use it or not - as you wish.
Code:
public void GradientCircle( int x, int y, int radius, int startcolor, int endcolor) { System.Drawing.SolidBrush brush = new System.Drawing.SolidBrush(Color.FromArgb(endcolor)); Color sc = Color.FromArgb(startcolor); Color ec = Color.FromArgb(endcolor); int rc = (sc.R - ec.R)/radius; int gc = (sc.G - ec.G)/radius; int bc = (sc.B - ec.B)/radius;
for (int i=radius;i>0;i--) { System.Drawing.Rectangle rect = new System.Drawing.Rectangle(x - i, y - i, i * 2, i * 2); brush.Color = Color.FromArgb( ec.R + rc*i, ec.G + gc*i , ec.B + bc*i); g.FillEllipse(brush, rect); } }
__________________
David Erez
Ramat Hasharon, Israel
I am rewriting my CAD module using your library. Is it possible to add different line types to the rectangles as well please. When one draws a box on the screen to select drawing entities, then it would be nice to have this box as dashed lines.
Something else. Is it please possible to introduce another "Rectangle" method by defining the two opposite corners of the rectangle?
The reason why I ask this, is because the user of the CAD program can define a rectangle using the stylus from left to right, right to left, from top to bottom, bottom to top, etc.
In the Compact framework there is no intrinsic way of drawing a rectangle by specifying its' co-ordinates. Rather than synthesising it within the library I would suggest that you make your own version in a module.
You should be able to draw a dashed rectangle on the device using a PenEx with DashStyles set to 1. The Compact Framework only supports a single dash style so if you want something different I again suggest that you roll your own using using DrawLineDashed or DrawLineDashDot.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.