Welcome, Guest. Please login or register.

Author Topic: Text Editor  (Read 3732 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: Text Editor
« Reply #14 from previous page: August 24, 2011, 05:28:32 PM »
Quote from: deniil;656016
programs have been forced to obtaining thousands of pens only because the Amiga gfx API is so increadably crappy when it comes to dealing with colors.

As far as I know there simply doesn't exist any function to draw a pixel/line/rectangle or text using RGB. Even using p96/cgfx there is still no RGB text function.

What do you do in such a crappy system?? :-(
Code: [Select]
SetRPAttrs(rp, RPTAG_PenMode, FALSE, RPTAG_FgColor, 0xFFCC88, TAG_DONE);
Example code here: http://www.sintonen.fi/src/misc/truecolortest.c (while written or MorphOS this extension has been adopted by AROS)
« Last Edit: August 24, 2011, 05:30:46 PM by Piru »
 

Offline trekiejTopic starter

Re: Text Editor
« Reply #15 on: August 24, 2011, 09:07:40 PM »
Thank you Piru.
Amiga 2000 Forever :)
Welcome to the Planar System.
 

Offline deniil

  • Newbie
  • *
  • Join Date: Jan 2004
  • Posts: 8
    • Show only replies by deniil
    • http://www.onyxsoft.nu
Re: Text Editor
« Reply #16 on: August 25, 2011, 03:28:31 PM »
@Piru

Quote
SetRPAttrs(rp, RPTAG_PenMode, FALSE, RPTAG_FgColor, 0xFFCC88, TAG_DONE);


Cool! Now let's hope Hype gets their act together and puts this into gfx.lib as well.

I don't need to setup some funky special custom messy bitmap myself to use this, do I?
Developer for OnyxSoft - Amiga
A1200 BPPC060/240+BVision ; A1-XE G4/800
 

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: Text Editor
« Reply #17 on: August 25, 2011, 03:34:34 PM »
Quote from: deniil;656103
@Piru
I don't need to setup some funky special custom messy bitmap myself to use this, do I?
You don't.

Of course if you wish to support planar modes you should have the code check for the bitmap depth and if <=8 use the old pen code. This assuming your app is opening on a public screen. If you use a custom truecolor screen then you don't need to worry about the pen stuff at all.
« Last Edit: August 25, 2011, 03:49:55 PM by Piru »