Xojo Conferences
XDCMay2019MiamiUSA

REALSelectGraphics (Real Studio Plugins Mailinglist archive)

Back to the thread list
Next thread: Is REALbasic made with xcode ?


macosx and unix paths   -   GOLD
  REALSelectGraphics   -   Alexander Cohen
   Re: REALSelectGraphics   -   Scott Wagner

REALSelectGraphics
Date: 30.06.06 19:05 (Fri, 30 Jun 2006 14:05:51 -0400)
From: Alexander Cohen
Hi, im using the following code to get the port of a graphics object
in a MachO plugin, then im getting the pixmap and the base address.
It works fine except that it always give me the base address of the
complete screen. Any ideas what might be going on. I've tested with
many different graphics object coming from canvases and pictures and
i always get the same results.

GrafPtr oldPort, newPort;
PixMapHandle pixMap;

GetPort(&oldPort);

REALSelectGraphics( graphics );

GetPort(&newPort);

pixMap = GetGWorldPixMap( newPort );
LockPixels( pixMap );

unsigned char* pixMapBase = (unsigned char*)GetPixBaseAddr(pixMap);

AC
_______________________________________________
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>

Re: REALSelectGraphics
Date: 30.06.06 19:16 (Fri, 30 Jun 2006 13:16:25 -0500)
From: Scott Wagner
i have never used this before but is there a way to set it as the
graphics your after or just the piece of the screen you are after.
sorry for the ignorance.

Scott
On Jun 30, 2006, at 1:05 PM, Alexander Cohen wrote:

> Hi, im using the following code to get the port of a graphics
> object in a MachO plugin, then im getting the pixmap and the base
> address. It works fine except that it always give me the base
> address of the complete screen. Any ideas what might be going on.
> I've tested with many different graphics object coming from
> canvases and pictures and i always get the same results.
>
> GrafPtr oldPort, newPort;
> PixMapHandle pixMap;
>
> GetPort(&oldPort);
>
> REALSelectGraphics( graphics );
>
> GetPort(&newPort);
>
> pixMap = GetGWorldPixMap( newPort );
> LockPixels( pixMap );
>
> unsigned char* pixMapBase = (unsigned char*)GetPixBaseAddr(pixMap);
>
> AC
> _______________________________________________
> 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>

_______________________________________________
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>