Welcome, Guest. Please login or register.

Author Topic: Text Editor  (Read 3781 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 all replies
    • http://www.iki.fi/sintonen/
Re: Text Editor
« on: 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 Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Text Editor
« Reply #1 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 »