![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Basic4ppc Wishlist Missing any feature? |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Erel
All the drawing commands like circle, line are limited to drawing on forms. It will be useful to have them work on controls. Thanks. David
__________________
David Erez Ramat Hasharon, Israel Last edited by derez : 01-15-2008 at 08:17 PM. |
|
|||
|
Erel
I do it with the use of dzimage.dll : I draw on another form and then copy the part I need to the image control. I just thought it can save some time and code. example: north_arrow(15,37,-rtrack) form6.Circle(15,37,12,Rgb(255,255,255),f) form6.Polygon(alX,0,alY,0,4,cBlack,f) compass.Image = img.CopyImage(form6.Image,3,25,25,25)
__________________
David Erez Ramat Hasharon, Israel |
|
||||
|
Thank's Erel
I know that the circle is a particular case of an ellipse. But from the drawing point of view: - the circle is defined by it's center coordinates and the radius - the ellipse is defined by it's outer rectangle So why not include both ? Best regards Klaus |
|
||||
|
I see your point and will consider it.
Generally speaking in order to keep the language simple I prefer not to overload it with almost duplicated functions. You can also achieve it with: Code:
Sub DrawCircle(drawerObject,x,y,r,color,fill)
rect.New1(x-r,y-r,2*r,2*r)
If fill Then
brush.Color = color
Control(drawerObject,Drawer).FillEllipse(brush.Value,rect.Value)
Else
pen.Color = color
Control(drawerObject,Drawer).DrawEllipse(pen.Value,rect.Value)
End If
Control(drawerObject,Drawer).Refresh2(rect.Value)
End Sub
Calling this sub:
DrawCircle ("drawer1",100,100,30,cRed,True)
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Drawing a Image bigger then the screen | Georg | Questions & Help Needed | 16 | 06-06-2008 05:36 PM |
| draw line into image control | giannimaione | Questions & Help Needed | 4 | 06-03-2008 05:40 PM |
| Control IMAGE | Joserra | Spanish Forum | 5 | 11-14-2007 06:58 PM |
| Drawing parts of a large image. | Erel | Code Samples & Tips | 0 | 06-07-2007 09:07 AM |
| Move an image inside an image control | Cableguy | Questions & Help Needed | 5 | 05-14-2007 08:40 PM |