Thanks Joe... Here's an example:

I have a canvas on a window. The canvas width is 260, and height is 195. I
have a pushbutton with the following code in the Action event:

Dim MyRect as New RectShape
Dim MyGroup as New Group2D

MyRect.FillColor=RGB(255,0,0)
MyRect.BorderColor=RGB(0,0,0)
MyRect.BorderWidth=2
MyRect.Border=100

MyRect.Width=50
MyRect.Height=50
MyRect.x=20
MyRect.y=20

MyGroup.Append(MyRect)

Canvas1.Graphics.DrawObject(MyGroup,0,0)

In this example, I would expect the rectangle object to be drawn 20 pixels
from both the left and top edges of the canvas. However, the rectangle
object is drawn beyond the left and top edges, to where the entire rectangle
is not visible. Changing the width and height of the RectShape (to 100
pixels each) will cause it to shift further to the left and top, moving even
further out of the boundaries of the canvas.

Thanks,

Bob


On 4/2/07 4:53 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> On Apr 02, 2007, at 19:53 UTC, Robert Fang wrote:
> 
>> Does anyone have any good examples of using Object2D and Group2D? My
>> attempts have left me scratching my head over the coordinate system.
>> I have been unable to get an object to draw where I think it would be.
> 
> It'd be helpful if you'd posted an example of it not drawing where you
> think it would be.  Otherwise, we have to come up with one that is
> likely to be trivial.  For example, create a RectShape at X=10, Y=20.
> Put this into a Group2D whose X=0 and Y=100.  Now shift the Group2D to
> the right 50 pixels, by changing its X to 50.  This shifts all
> contents, so if you inspected your RectShape you'd find that X=60.  If
> you g.DrawObject this at 0,0, then the RectShape appears at 60,20.  If
> you g.DrawObject the group at 2,3, then the RectShape appears at 62,23.
> 
> Best,
> - Joe
> 
> 
> --
> Joe Strout -- [EMAIL PROTECTED]
> Verified Express, LLC     "Making the Internet a Better Place"
> http://www.verex.com/
> 
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> 
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>




_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to