So am I. Example code is any basic QD graphics call like:

    SetRect r,left, top, right ,bottom
    SetForeColor 205   ' red
    FrameRect r

I decided to migrate my code from QD because the writing is on the wall...

So I ran into another problem (this concerns the classic "marching
ants" selection outlines used on the Mac since the beginning).  Doing
this in QD was easy, with a pen pattern and a timer that shifted the
pattern and re-drew the outline every 1/4 second or so, simulating a
march.

Forget the march, all I want now is a dashed border for my rects: is
there a way to dash a figure border of RB's built-in Object2D's, like
a RectShape?  Surely OpenGL (I gather this is what Object2D's are
based on?) can do this and much more, but I don't see how off-hand.

Any pointers?

Thanks!
Peter,



On 4/27/06, Charles Yeomans <[EMAIL PROTECTED]> wrote:
> Okay, I'm stumped without example code.
>
> Charles Yeomans
>
> On Apr 27, 2006, at 4:26 PM, Peter K. Stys wrote:
>
> > Yes.
> >
> > On 4/27/06, Charles Yeomans <[EMAIL PROTECTED]> wrote:
> >> Are you setting UseOldRenderer = true?
> >>
> >> Charles Yeomans
> >>
> >> On Apr 27, 2006, at 3:36 PM, Peter K. Stys wrote:
> >>
> >>> Yes Charles, you're right:
> >>>
> >>> SetPort GetWindowPort(self.MacWindowPtr)
> >>>
> >>> is the correct call, but this didn't work, still no QD graphics
> >>> display in self
> >>>
> >>> I tried your suggestion to touch the graphics object:
> >>>
> >>>       self.Graphics.DrawRect 0,0,0,0
> >>>
> >>> But this didn't work either.
> >>>
> >>> Any other ideas on how to get QD calls to draw in a particular
> >>> window?
> >>>
> >>> P.
> >>>
> >>> On 4/27/06, Charles Yeomans <[EMAIL PROTECTED]> wrote:
> >>>> The standard trick is to touch the Graphics object by calling of
> >>>> one
> >>>> its drawing methods to get REALbasic to set the graphics port.
> >>>> SetPort and REAL basic do not play well together. MacWindowPtr
> >>>> returns a WindowPtr; you have to pass something else to SetPort. I
> >>>> recall that there is a Window Manager function that takes a
> >>>> WindowPtr
> >>>> and returns a CGrafPtr or whatever you would pass to SetPort.
> >>>>
> >>>> Charles Yeomans
> >>>>
> >>>> On Apr 27, 2006, at 3:00 PM, Peter K. Stys wrote:
> >>>>
> >>>>> I have some QD calls that draw stuff. Problem is, often the
> >>>>> drawing
> >>>>> occurs at the right coordinates, but in the wrong window.  So I
> >>>>> guess
> >>>>> I need to set the grafport of a particular window.
> >>>>>
> >>>>> Do I use SetPort?  If so, what do I pass?
> >>>>>
> >>>>> SetPort self.macWindowPtr causes a crash so that's not it.
> >>>>>
> >>>>> Any ideas?
> >>>>>
> >>>>> Incidentally, this wasn't an issue with earlier versions of RB,
> >>>>> but
> >>>>> since 2K5 and 2K6, activating a window does not reset the grafport
> >>>>> accordingly.
> >>>>>
> >>>>>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>
>


--
-------------------------------------------------------------------------------
Peter K. Stys, MD
Professor of Medicine(Neurology), Senior Scientist
Ottawa Health Research Institute, Div. of Neuroscience
Ottawa Hospital / University of Ottawa
Ontario, CANADA
tel:    (613)761-5444
fax:    (613)761-5330
http://www.ohri.ca/profiles/stys.asp
-------------------------------------------------------------------------------
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to