New topic: DrawObject X and Y problems
<http://forums.realsoftware.com/viewtopic.php?t=45309> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message Carharttguy Post subject: DrawObject X and Y problemsPosted: Mon Sep 10, 2012 10:00 am Joined: Wed Sep 17, 2008 2:45 pm Posts: 162 Hello, I'm drawing some things on a canvas, but it gives me some weird results (Could be my mistake) I have a Canvas with this in the paintevent: g.ForeColor = RGB(171,171,171) g.fillRect(0,0,me.width,me.height) dim frm as new aForm frm.Left = 100 frm.Top = 100 frm.Title = "SomeWord" frm.Height = 300 frm.Width = 300 g.DrawObject(frm.ToImage, frm.Left, frm.Top) The first 2 lines is just zo I can see where the canvas starts Where frm.ToImage is a method that returns a Group2D. This is my result in the canvas: The wiki says: Quote:The optional parameters DeltaX and DeltaY are offsets from the top-left corner of the Graphics object to the top-left corner of the Object. But, I didn't change anything, so I guess the Graphics object, should be at 0,0? So, it's not at 100,100 but rather 0,0, because it is in the left upper corner. So I don''t see what the deltaX and deltaY actually does? And also a small extra question: Is there a way to change the anchor point of a Group2D object? It is in the center, and everything in RS is measured from the top left, why is Group2D measured from the center? That's not easy to work with.. The wiki says:Quote:The horizontal position of the center or main anchor point. My question, how to change that main anchor point? Thanks! _________________ My native language is not English. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
