Re: [Tuxpaint-devel] Magic API updated: switchin() and switchout()
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
|
From: foo-script <foo...@o2...> - 2008-07-09 01:14:07
|
This question was to Albert but maybe... (I'm not sure of this solution)
Albert, if I use this signals incorrect let me know please.
void plugin_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b)
allow you to fetch RGB values, but doesn't allow to create unified color value using SDL_MapRGB, but switchin() does.
void plugin_switchin(magic_api * api, int which, SDL_Surface * canvas)
{
plugin_color=SDL_MapRGB(canvas->format, plugin_r, plugin_g, plugin_b);
}
Dnia 9 lipca 2008 2:35 Bill Kendrick <nb...@so...> napisał(a):
>
> I understand the jist, but could you give me an example chunk of code
> (within a Magic tool) where this is used, so I can make sure I do it
> properly? (I don't want to forget to do this, which I will in a matter
> of days :^/ )
>
> -bill!
|