realbasic-nug
[Top] [All Lists]

A bad bug in Graphics.Clip OSX 10.4.11 PPC RB2009.2.1

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: A bad bug in Graphics.Clip OSX 10.4.11 PPC RB2009.2.1
From: Karen <keatk@verizon.net>
Date: Mon, 01 Jun 2009 01:47:23 -0400
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
I was trying to draw group2Ds in a Listbox Textpaint Event... and was getting nothing. I figured that I was getting positional calculations wrong within the group (I often mess up with Group2D's - not used to thinking with the center as the origin) . So I kept tweaking things even though I though what I had SHOULD have worked...

Well a good while later i finally realized that it could NOT be me. So instead of drawing in a listbox I tried drawing in the paint event of a canvas .. and low and behold everything was as it should have been (after I undid all the tweaking)....

Then it dawned on me. In the listbox one is not printing to the original graphics object but to one obtained from graphics.clip that is the visible size of the cell

So in my test canvas I put the following code In the Paint event:

  g.DrawRect 0,0, g.Width -1 , g.Height -1

  Static R As New RoundRectShape
  R.Fill = 0
  R.Border = 100
  R.Width = 12
  R.Height = 10
  R.CornerWidth = 4
  R.CornerHeight = 4
  R.Segments = 10

  g.DrawObject R, 15, 20

  Dim Gr As Graphics= g.Clip(0,0, g.Width, g.Height)
  gr.DrawObject R, 15, 50


If things were working correctly I would expect to see two rounded rectangles offset vertically.


Well the top one was what was expected... but the bottom one was totally messed up... It looked like a black pealed banana pointing roughly south west (with the 2 peals hanging)... Note even REMOTELY like a rounded rectangle!!!! I think StringShapes may be messed up in clipped regions but i did not go through and test all the object2D's...


Historically this is the type of bug that does not get fixed for a long time because not a lot of people trip over it <sigh>... But it once again illustrates why doing anything non routine in RB as always been crapshoot as long as I have been using it...

- karen

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

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


<Prev in Thread] Current Thread [Next in Thread>
  • A bad bug in Graphics.Clip OSX 10.4.11 PPC RB2009.2.1, Karen <=