Xojo Conferences
XDCMay2019MiamiUSA

Color Data (Real Studio Plugins Mailinglist archive)

Back to the thread list
Previous thread: Destructor with garbage parameter or without?
Next thread: DropDown menu in prop window


Re: Control embedding   -   Will Cosgrove
  Color Data   -   Matheau Dakoske
   Re: Color Data   -   Christian Schmitz
   Re: Color Data   -   Joseph J. Strout

Color Data
Date: 17.09.02 00:57 (Mon, 16 Sep 2002 16:57:28 -0700)
From: Matheau Dakoske
From within a plugin, if I were to create a color using
theREALcolorObject = REALnewInstance( "Color" ), is it possible to set
the values for that color such as RGB?

Thanks,
Matheau

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: Color Data
Date: 17.09.02 02:12 (Tue, 17 Sep 2002 03:12:31 +0200)
From: Christian Schmitz
> From within a plugin, if I were to create a color using
> theREALcolorObject = REALnewInstance( "Color" ), is it possible to set
> the values for that color such as RGB?

color = integer = long in C

example:

long RGB(long r, long g, long b);
long RGB(long r, long g, long b)
{
return (r<<16) | (g<<8) | (b);
}

PS: Function not tested for errors, but should work.

Mfg
Christian

Re: Color Data
Date: 17.09.02 02:42 (Mon, 16 Sep 2002 18:42:32 -0700)
From: Joseph J. Strout
At 4:57 PM -0700 9/16/02, Matheau Dakoske wrote:

>From within a plugin, if I were to create a color using
>theREALcolorObject = REALnewInstance( "Color" )

You can't do it this way. Colors are not objects; to a plugin,
they're long integers. See Christian's reply, as well as several of
the samples in the SDK, for how to deal with RB colors.

Cheers,
- Joe