Welcome, Guest. Please login or register.

Author Topic: SetAPen(RastPort*, UBYTE);  (Read 4295 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: SetAPen(RastPort*, UBYTE);
« Reply #14 from previous page: April 06, 2010, 01:02:47 PM »
Quote from: xeron;551664
If you're targetting OS4:

IGraphics->SetRPAttrs( rastport, RPATTR_APenColor, 0xRRGGBB, TAG_DONE );
And if you were targetting AROS/MorphOS you would use:

SetRPAttrs( rastport, RPTAG_FgColor, 0xRRGGBB, TAG_DONE );

At least MorphOS defaults to 3.x pens though, so before using truecolor rendering you should call SetRPAttrs( rastport, RPTAG_PenMode, FALSE, TAG_DONE );. That tells MorphOS that you really want to render by using RGB rather than pens. I don't remember if AROS had such "pen mode" default or not.

Anyway, if AROS graphicslibrary would be backported you'd get the RPTAG_FgColor and RPTAG_BgColor similar to AROS/MorphOS.

Here's some example code I wrote some time ago: http://www.sintonen.fi/src/misc/truecolortest.c
« Last Edit: April 06, 2010, 01:05:02 PM by Piru »
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show only replies by xeron
    • http://www.petergordon.org.uk
Re: SetAPen(RastPort*, UBYTE);
« Reply #15 on: April 06, 2010, 01:03:33 PM »
Quote from: bernd_afa;551686

I better not tell what i miss(the list get too long)on OS4, but a AOS with all features of MOS and OS4 and Hardware support of MOS and OS4 that come in my mind for a good future AOS.


You just can't go a single post without making a dig at OS4 can you? *sigh*
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show only replies by xeron
    • http://www.petergordon.org.uk
Re: SetAPen(RastPort*, UBYTE);
« Reply #16 on: April 06, 2010, 01:05:40 PM »
@Piru
There is no "mode" on OS4, or at least the mode is transparent. If you set "APenColor" APen is an RGB colour value. If you then use SetAPen(), its a pen again.
Playstation Network ID: xeron6
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: SetAPen(RastPort*, UBYTE);
« Reply #17 on: April 06, 2010, 01:07:25 PM »
The OP hasn't really said what his target platform was, but reading between the lines, I assumed vanilla OS3.x.

The 4.x/AROS/MOS methods are interesting to note, but are they relevant?
int p; // A
 

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by unusedunused
Re: SetAPen(RastPort*, UBYTE);
« Reply #18 on: April 06, 2010, 01:08:30 PM »
Quote from: Karlos;551687
Sure, but that's thanks to AfA, not AmigaOS 3.x tself.


sure but AFA can use for free, nobody must buy a expensive Hardware for this or pay any cent.

And btw this programs run too well when run on MOS(either 68k /PPC or compile for AROS)

only problem AFA have, it have no Licence from Ainc and no AOS source.But it run stable and is near 100% compatible and enhance AOS with the important missed features.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: SetAPen(RastPort*, UBYTE);
« Reply #19 on: April 06, 2010, 01:10:59 PM »
Quote from: xeron;551690
@Piru
There is no "mode" on OS4, or at least the mode is transparent. If you set "APenColor" APen is an RGB colour value. If you then use SetAPen(), its a pen again.
Well I hope there at least is some way to get and set the mode somehow? Else it'd be a bit messy to write library code that does some rendering using specific mode while restoring the old mode afterwards.
 

Offline unusedunused

  • Sr. Member
  • ****
  • Join Date: Nov 2005
  • Posts: 479
    • Show only replies by unusedunused
Re: SetAPen(RastPort*, UBYTE);
« Reply #20 on: April 06, 2010, 01:13:33 PM »
Quote from: xeron;551689
You just can't go a single post without making a dig at OS4 can you? *sigh*


You was the guy that tell all should buy OS4.If you not write it, i need nothing write about too few OS4 features for me to buy.

I tell what i miss in short this time in OS4.

Maybe the OS4 guys make it better, then maybe i can buy it.