Implementing AggPas with PtcGraph

classic Classic list List threaded Threaded
103 messages Options
123456
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Zaaphod
I was trying to find putimage to see how it worked...  and I came across some notes about it in graph.inc as follows:
{ For significant speed improvements , is is recommended }  
{ that these routines be hooked (otherwise the default,  }
{ slower routines will be used) :                        }
..
{   PutImage()                                           }
..

what does 'these routines be hooked'  mean?  Is that something I should be doing in my program or something that is already done internally with ptcgraph?


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Nikolay Nikolov-2


On 06/21/2017 10:27 PM, James Richters wrote:
> I was trying to find putimage to see how it worked...  and I came across some notes about it in graph.inc as follows:
> { For significant speed improvements , is is recommended }
> { that these routines be hooked (otherwise the default,  }
> { slower routines will be used) :                        }
> ..
> {   PutImage()                                           }
> ..
>
> what does 'these routines be hooked'  mean?  Is that something I should be doing in my program or something that is already done internally with ptcgraph?
Something to be done in the ptcgraph sources, so that putimage becomes
faster.

Nikolay
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Zaaphod
In reply to this post by Nikolay Nikolov-2
>putimage can be accelerated, although it would still have to do a memory copy.

Like this?
https://github.com/Zaaphod/ptcpas/compare/Zaaphod_Custom?expand=1#diff-fb31461e009ff29fda5c35c5115978b4

This is amazingly faster.   I ran a test of just ptcgraph.putimage() in a loop, putting the same image over and over 1000 times and timing it.  The original ptcgraph.putimage() took 18.017 seconds.  After I applied this, the same loop took 1.056 seconds.  Quite an improvement!    It's still nowhere near as fast as just drawing stuff with ptcgraph directly, but for doing a memory copy of the entire screen, it's very fast

I have an idea on how I could speed it up even further....
If I set up a second array with 1 bit per pixel, then (somehow) aggpas could set bits in this array to 1 whenever it changed a corresponding bit.  Now by analyzing the 'pixel changed' array one word at a time, (or maybe longword or qword at a time)  I could just skip over all the words that =0 and when I come across a word that <> 0   I could do a binary search of that word to only change the pixels that need to be changed.  If very little on the screen has changed, this would be quite a bit faster because the pixel changed array would be 1/16 the size of the full buffer.

The only way this would be of any benefit though is if aggpas set the bits in the 'pixel changed' array while it was changing the pixels of the buffer, because at that time it already has the array position and the fact that something changed available.  If I had to analyze the buffer separately and create the 'pixels changed' array, it would take too long.


James


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Nikolay Nikolov-2


On 06/22/2017 01:21 AM, James Richters wrote:
>> putimage can be accelerated, although it would still have to do a memory copy.
> Like this?
> https://github.com/Zaaphod/ptcpas/compare/Zaaphod_Custom?expand=1#diff-fb31461e009ff29fda5c35c5115978b4
>
> This is amazingly faster.   I ran a test of just ptcgraph.putimage() in a loop, putting the same image over and over 1000 times and timing it.  The original ptcgraph.putimage() took 18.017 seconds.  After I applied this, the same loop took 1.056 seconds.  Quite an improvement!    It's still nowhere near as fast as just drawing stuff with ptcgraph directly, but for doing a memory copy of the entire screen, it's very fast
Yes, that's a good start. That was exactly what I meant :)
>
> I have an idea on how I could speed it up even further....
> If I set up a second array with 1 bit per pixel, then (somehow) aggpas could set bits in this array to 1 whenever it changed a corresponding bit.  Now by analyzing the 'pixel changed' array one word at a time, (or maybe longword or qword at a time)  I could just skip over all the words that =0 and when I come across a word that <> 0   I could do a binary search of that word to only change the pixels that need to be changed.  If very little on the screen has changed, this would be quite a bit faster because the pixel changed array would be 1/16 the size of the full buffer.
>
> The only way this would be of any benefit though is if aggpas set the bits in the 'pixel changed' array while it was changing the pixels of the buffer, because at that time it already has the array position and the fact that something changed available.  If I had to analyze the buffer separately and create the 'pixels changed' array, it would take too long.
That sounds like a little bit of a special case - it'll work where
you're using putimage for a large area, that has very few pixels set.
Perhaps just reimplementing the general algorithm in inline asm, by
using SSE (or MMX) vector instructions would be the fastest, but maybe
it's not worth the pain and the pascal implementation is fast enough for
you. Just experiment and see what works best :)

Nikolay
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Nikolay Nikolov-2



On 06/22/2017 02:42 AM, Nikolay Nikolov wrote:


On 06/22/2017 01:21 AM, James Richters wrote:
putimage can be accelerated, although it would still have to do a memory copy.
Like this?
https://github.com/Zaaphod/ptcpas/compare/Zaaphod_Custom?expand=1#diff-fb31461e009ff29fda5c35c5115978b4

This is amazingly faster.   I ran a test of just ptcgraph.putimage() in a loop, putting the same image over and over 1000 times and timing it.  The original ptcgraph.putimage() took 18.017 seconds.  After I applied this, the same loop took 1.056 seconds.  Quite an improvement!    It's still nowhere near as fast as just drawing stuff with ptcgraph directly, but for doing a memory copy of the entire screen, it's very fast
Yes, that's a good start. That was exactly what I meant :)

I have an idea on how I could speed it up even further....
If I set up a second array with 1 bit per pixel, then (somehow) aggpas could set bits in this array to 1 whenever it changed a corresponding bit.  Now by analyzing the 'pixel changed' array one word at a time, (or maybe longword or qword at a time)  I could just skip over all the words that =0 and when I come across a word that <> 0   I could do a binary search of that word to only change the pixels that need to be changed.  If very little on the screen has changed, this would be quite a bit faster because the pixel changed array would be 1/16 the size of the full buffer.

The only way this would be of any benefit though is if aggpas set the bits in the 'pixel changed' array while it was changing the pixels of the buffer, because at that time it already has the array position and the fact that something changed available.  If I had to analyze the buffer separately and create the 'pixels changed' array, it would take too long.
That sounds like a little bit of a special case - it'll work where you're using putimage for a large area, that has very few pixels set. Perhaps just reimplementing the general algorithm in inline asm, by using SSE (or MMX) vector instructions would be the fastest, but maybe it's not worth the pain and the pascal implementation is fast enough for you. Just experiment and see what works best :)
Btw, I looked at your code again and saw a quick and cheap optimization - just move the case statement (case BitBlt of) outside the inner loop (for i:=X to X1 do), so the value of BitBlt is not checked once every pixel, but once per row.

Nikolay

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Marco van de Voort
In reply to this post by Zaaphod
In our previous episode, James Richters said:

> >putimage can be accelerated, although it would still have to do a memory copy.
>
> Like this?
> https://github.com/Zaaphod/ptcpas/compare/Zaaphod_Custom?expand=1#diff-fb31461e009ff29fda5c35c5115978b4
>
> This is amazingly faster.   I ran a test of just ptcgraph.putimage() in a
> loop, putting the same image over and over 1000 times and timing it.  The
> original ptcgraph.putimage() took 18.017 seconds.  After I applied this,
> the same loop took 1.056 seconds.  Quite an improvement!  It's still
> nowhere near as fast as just drawing stuff with ptcgraph directly, but for
> doing a memory copy of the entire screen, it's very fast

Try rearranging that like this:


var pdest,psrc: pword;
     

for j:=Y to Y1 do
   Begin
     inc(k,deltaX);
     pdest:=@pixels[X+j*PTCWidth];
     psrc:=@pt(bitmap)[k];
     case BitBlt of
           XORPut:       for i:=0 to X1-X do
                           begin
                             pdest^:=pdest^ xor psrc^;
                             inc(pdest); inc(psrc);
                           end;
              // etc other cases similarly
            end;
     inc(k,x1-x+1); // we must make up for as many K updates as the for loop.
     inc(k,deltaX1);
    end;

Note that all array calculation and the case is removed from the inner most
loop, at the expense of duplicating the for loop. The index is not used in
the for loop and made 0 based to allow the tighest FOR loop code generation.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Zaaphod
In reply to this post by Nikolay Nikolov-2

>That sounds like a little bit of a special case - it'll work where you're using putimage for a large area, that has very few pixels set.

 

That is exactly what I have almost all the time.  I’m wanting to use putimage for the entire screen all the time, but very few pixels on the screen change at any given screen update.  I have already tried only using putimage for part of the screen, and that helps sometimes, but most of the time it doesn’t help enough, because I’ll be drawing a long diagonal line, or a big ellipse and to encase the entity in a rectangular shape ends using a good portion of the screen, and by the time I get done calculating how to make the only slightly smaller area, I might as well just did putimage on the entire screen.

 

>Perhaps just reimplementing the general algorithm in inline asm, by using SSE (or MMX) vector instructions would be the fastest

 

That sounds completely over my head 😊

 

>but maybe it's not worth the pain

 

Maybe not…. I’m pretty sure I can handle processing the second array, but how and where to create it in aggpas, that I have no idea… yet… I have not actually tried to see how aggpas puts data in the buffer yet… It’s a huge package and I’m not sure what unit it’s even in.

 

>and the pascal implementation is fast enough for you.

 

It’s not quite fast enough yet… 

 

>Just experiment and see what works best :)

 

Sounds like fun 😊   Maybe I’ll do a test and pre-build the second array myself, just to see if there is any real benefit to this whole idea and if there is then I’ll try to figure out how to do it with aggpas

 

>Btw, I looked at your code again and saw a quick and cheap optimization - just move the case statement (case BitBlt of) outside the inner loop (for i:=X to X1 do), so the value of BitBlt is not checked once every pixel, but once per row.

Great Idea, I took it one step further, wanting it to be as fast as possible and only check BitBlt once for the entire nested loop.  I also made a combined procedure for both 8bpp and 16bpp.  This is about 7% faster. You can see it here:

https://github.com/Zaaphod/ptcpas/compare/Avoid_ReChecking_Bitblt#diff-fb31461e009ff29fda5c35c5115978b4

 

 

>Try rearranging that like this:

>..

>Code

>..

>Note that all array calculation and the case is removed from the inner most loop, at the expense of duplicating the for loop.

>The index is not used in the for loop and made 0 based to allow the tighest FOR loop code generation.

 

I also tried this, but for some strange reason it’s slower.. clocking in at 1.773s for my 1000x loop instead of 1.056s maybe I did something wrong.  Here is what I did:

https://github.com/Zaaphod/ptcpas/compare/Restructure_PutImage_Loop#diff-fb31461e009ff29fda5c35c5115978b4

maybe the two  inc(pdest); inc(psrc); inside the inner loop are slower than the inc(k)?

 

 

James

 

 




_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Zaaphod

I squeezed a little more out of putimage by doing as little math as possible with a couple of variables to store j*ptcwidth and i+j*ptcwidth  I got my 1000x test loop down to 1.013 seconds.  Here is what it looks like at the moment, any ideas on how to optimize it further?

 

https://github.com/Zaaphod/ptcpas/compare/master...Zaaphod_Custom#diff-fb31461e009ff29fda5c35c5115978b4

 

var

  pixels:Pword;

  k: longint;

  i, j, y1, x1, deltaX, deltaX1, deltaY: smallint;

  JxW, I_JxW: Longword;

..

        XORPut:

          Begin

            for j:=Y to Y1 do

              Begin

                JxW:=j*PTCWidth;

                inc(k,deltaX);

                for i:=X to X1 do

                  begin

                    I_JxW:=i+JxW;

                    pixels[I_JxW] := pixels[I_JxW] xor pt(bitmap)[k];

                    inc(k);

                  end;

                inc(k,deltaX1);

              End;

          End;

..

 

James


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Martin Schreiber-2
On Thursday 22 June 2017 18:47:40 James Richters wrote:
> I squeezed a little more out of putimage by doing as little math as
> possible with a couple of variables to store j*ptcwidth and i+j*ptcwidth  I
> got my 1000x test loop down to 1.013 seconds.  Here is what it looks like
> at the moment, any ideas on how to optimize it further?
>
Please push your changes so we can work with the real code.

Martin
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Martin Schreiber-2
On Friday 23 June 2017 06:38:18 Martin Schreiber wrote:
> On Thursday 22 June 2017 18:47:40 James Richters wrote:
> > I squeezed a little more out of putimage by doing as little math as
> > possible with a couple of variables to store j*ptcwidth and i+j*ptcwidth
> > I got my 1000x test loop down to 1.013 seconds.  Here is what it looks
> > like at the moment, any ideas on how to optimize it further?
>
> Please push your changes so we can work with the real code.
>
Sorry, I found it, it is in branch Avoid_ReChecking_Bitblt.

Martin


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Martin Schreiber-2
In reply to this post by Zaaphod
On Thursday 22 June 2017 18:47:40 James Richters wrote:
> I squeezed a little more out of putimage by doing as little math as
> possible with a couple of variables to store j*ptcwidth and i+j*ptcwidth  I
> got my 1000x test loop down to 1.013 seconds.  Here is what it looks like
> at the moment, any ideas on how to optimize it further?
>
"
var
  pixels:Pword;
  k: longint;
  i, j, y1, x1, deltaX, deltaX1, deltaY: smallint;
  JxW, I_JxW: Longword;
  sourcepo,destpo,endpo: pcard16;
[...]
        XORPut:
          Begin
            for j:=Y to Y1 do
              Begin
                JxW:=j*PTCWidth;
                inc(k,deltaX);

                sourcepo:= @pt(bitmap)[k];
                destpo:= @pixels[jxw+x];
                endpo:= destpo+x1-x;
                inc(k,x1-x+1);
                while destpo <= endpo do begin
                 destpo^:= destpo^ xor sourcepo^ and colormask;
                 inc(sourcepo);
                 inc(destpo);
                end;
{
                for i:=X to X1 do
                  begin
                    I_JxW:=i+JxW;
                    pixels[I_JxW] := pixels[I_JxW] xor (pt(bitmap)[k] and
ColorMask);
                    inc(k);
                  end;
}
                inc(k,deltaX1);
              End;
          End;
"
On 32 bit Linux with 1024x768 screen and bitmap:

FPC 3.0.3 -O-:
1001 runs
origin  2.2167833261452355E+000 ms per put
mse  2.0649356462366574E+000 ms per put

FPC 3.0.3 -O3:
1001 runs
origin  2.2787212782151454E+000 ms per put
mse  6.0739260367848180E-001 ms per put

MSElang with LLVM 3.8.0 backend no optimisation:
1001 runs
origin 1.97338 ms per put
mse 2.03776 ms per put

MSElang with LLVM 3.8.0 backend -O3:
1001 runs
origin 0.406554 ms per put
mse 0.454978 ms per put

The project is here:
https://gitlab.com/mseide-msegui/mselang/tree/master/mselang/benchmark/putimage

Martin
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Zaaphod
I'm trying to switch over a program to use aggpas but I'm not getting any results from moveto or lineto am I missing something?

I made a little demo that illustrates what's happening

  agg^.lineWidth(4);
  agg^.lineColor(0, 155, 0, 255);
  agg^.rectangle(10, 10, 50, 50);
  agg^.lineColor(155, 0, 0, 255);
  agg^.line(60, 10, 60, 50);
  agg^.lineto(100,50);           //no line drawn here
  agg^.lineColor(0, 0, 155, 255);
  agg^.moveto(100, 10);
  agg^.lineto(100,50);            //no line drawn  here
  agg^.lineColor(155, 0, 155, 255);
  agg^.line(120, 10, 120, 50);

James

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Stefan V. Pantazi
When in doubt, have a look at the source code of the graphical
primitives to determine the semantics of each one. Unlike line primitive
which draws a path immediately, lineto is meant to be used multiple
times, as part of a draw path. So, lineto does not really draw, it just
adds a vertex to a vertex storage object. To draw a path, you need to
use the drawPath(option):

   agg^.lineWidth(4);
   agg^.lineColor(0, 155, 0, 255);
   agg^.rectangle(10, 10, 50, 50);
   agg^.lineColor(155, 0, 0, 255);
   agg^.line(60, 10, 60, 50);
   agg^.lineto(100,50);           //no line drawn here, just adds to
vertex storage
   agg^.drawPath(StrokeOnly);   //draw path
   agg^.lineColor(0, 0, 155, 255);
   agg^.moveto(100, 10);
   agg^.lineto(100,50);           //no line drawn here, just adds to
vertex storage
   agg^.drawPath(StrokeOnly);   //draw path
   agg^.lineColor(155, 0, 155, 255);
   agg^.line(120, 10, 120, 50);


On 06/23/2017 01:27 PM, James Richters wrote:
> I'm trying to switch over a program to use aggpas but I'm not getting any results from moveto or lineto am I missing something?
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Zaaphod
> lineto is meant to be used multiple times, as part of a draw path. So, lineto does not really draw,
>it just adds a vertex to a vertex storage object. To draw a path, you need to use the drawPath(option):

Thank you for the information!  I thought I was missing something.

James

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Zaaphod
Is there a way to re-scale a drawing with agg_2D?  Basically I'm wanting to zoom in/out of a drawing made with lines and arcs and I'm wondering the most efficient way to do it.  I found a scale feature in aggpas but it only seems to scale items drawn after the command is issued.  I'm wondering if there is a way to send aggpas all my lines and arcs, then give it a scale and offset, display it that way, then a different scale and offset, then redisplay it that way, or do I just need to do this myself and just clear aggpas and re-send the lines and arcs at the new scale and offset to aggpas from scratch.

James

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Stefan V. Pantazi

On 06/26/2017 10:21 AM, James Richters wrote:
> Is there a way to re-scale a drawing with agg_2D?

I think so, scaling is one of the transformations that agg supports
well. The way I would go about this would be to study how agg manages
the parsing, storage and display of svg drawings, which are basically
collections of drawing commands, just like yours. Compile, run and
analyze the code of svg examples, in particular svg_test demo (the one
with the lion head).

I found a scale feature in aggpas but it only seems to scale items drawn
after the command is issued.

Scaling is done through matrix multiplication but you need to have all
your drawing commands stored in a similar way agg does it for svg, so
that they can be redrawn. This is a more flexible approach than
reiterating over hardcoded drawing commands. The cost is the increased
complexity.

I'm wondering if there is a way to send aggpas all my lines and arcs,
then give it a scale and offset, display it that way, then a different
scale and offset, then redisplay it that way,

I think doing this in a way similar to svg routines is one way to go and
may have its limitations. While significantly more complicated, you also
get as a byproduct the capability of saving your screen (think
screenshots, etc.) in standard svg format that can be persisted beyond
your application lifecycle.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Zaaphod
I've figured out a way to get my animations to work fast and still have the quality of aggpas.  The problem I have is that even though I've managed to accelerate putimage() and it's pretty fast, it's still not fast enough and my animations in my program happen too slow, especially on slow computers.  I can build the screen fast with aggpas, and I can do putimage() pretty fast, but for some reason making a change with aggpas then putimage, then change aggpas then putimage... is slower.  So I came up with a solution.  I do the animations with ptcgraph commands at the same time I build the screen with aggpas, then when the animation is finished, I do my putimage() and replace the screen with the aggpas rendered version.  It works out that during the animation, the screen is changing distractingly fast that you really don't notice the lower quality graphics produced by ptcgraph routines, and when it stops and now you have a chance to look a it, the screen has been replaced with the aggpas version so everything looks nice and smooth 😊   With this method I actually had to put a delay in my animation cycle or it was too fast and I lost the animation effect I was looking for.  

Now I'm ready to start integrating everything I learned into my real application and I have a question.
My original application used only 8bit colors, but now I am upgrading it to 16bit colors because it will give aggpas more to work with for it's anti-aliasing.   Is there some formula or maybe even some function in freepascal somewhere that converts 8bit colors to their 16bit equivalents?   The two color schemes are nothing alike.  16bit is using this RGB565 format, but 8bit colors (at least the version I was using) the colors have no real relation to their bits (see this https://pasteboard.co/2K38l6Gk1.png)  I can't figure out any pattern to this at all and while some colors I can figure out, others would be quite difficult.  I'm wondering if maybe there is already some translation from these 8bit color designations into 16bit color designations so all I would have to do is a global search and replace of setcolor(x) to setcolor(8bit_to_16bit(x)); and then all my colors would be the same as they were.

I'm also wondering if there is already some function to either convert the 16bit RGB565 colors into separate 8bit values of red, green, and blue suitable to plug into aggpas procedures like
agg^.lineColor(red, green, blue, 255);  I could probably manage something for this because it's pretty well defined that I have 5bits red, 6 bits green, and 5 bits blue, but still I'm not exactly clear how it would get from 5 or 6 bits up to 8 bits per color...  but if it's already available somewhere I might as well use what's done already.

James


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

José Mejuto
El 28/06/2017 a las 23:50, James Richters escribió:
> The two color schemes are nothing alike.  16bit is using this RGB565 format, but 8bit colors (at least the version I was using) the colors have no real relation to their bits (see thishttps://pasteboard.co/2K38l6Gk1.png)  I can't figure out any pattern to this at all and while some colors I can figure out, others would be quite difficult.

Hello,

Your palette looks like standard Int Mode 13h VGA palette (yes, I'm
older). This are the RGB values (I'm quite sure):

palette[  0] = rgb(  0,  0,  0)
palette[  1] = rgb(  0,  0,170)
palette[  2] = rgb(  0,170,  0)
palette[  3] = rgb(  0,170,170)
palette[  4] = rgb(170,  0,  0)
palette[  5] = rgb(170,  0,170)
palette[  6] = rgb(170, 85,  0)
palette[  7] = rgb(170,170,170)
palette[  8] = rgb( 85, 85, 85)
palette[  9] = rgb( 85, 85,255)
palette[ 10] = rgb( 85,255, 85)
palette[ 11] = rgb( 85,255,255)
palette[ 12] = rgb(255, 85, 85)
palette[ 13] = rgb(255, 85,255)
palette[ 14] = rgb(255,255, 85)
palette[ 15] = rgb(255,255,255)
palette[ 16] = rgb(  0,  0,  0)
palette[ 17] = rgb( 20, 20, 20)
palette[ 18] = rgb( 32, 32, 32)
palette[ 19] = rgb( 44, 44, 44)
palette[ 20] = rgb( 56, 56, 56)
palette[ 21] = rgb( 68, 68, 68)
palette[ 22] = rgb( 80, 80, 80)
palette[ 23] = rgb( 97, 97, 97)
palette[ 24] = rgb(113,113,113)
palette[ 25] = rgb(129,129,129)
palette[ 26] = rgb(145,145,145)
palette[ 27] = rgb(161,161,161)
palette[ 28] = rgb(182,182,182)
palette[ 29] = rgb(202,202,202)
palette[ 30] = rgb(226,226,226)
palette[ 31] = rgb(255,255,255)
palette[ 32] = rgb(  0,  0,255)
palette[ 33] = rgb( 64,  0,255)
palette[ 34] = rgb(125,  0,255)
palette[ 35] = rgb(190,  0,255)
palette[ 36] = rgb(255,  0,255)
palette[ 37] = rgb(255,  0,190)
palette[ 38] = rgb(255,  0,125)
palette[ 39] = rgb(255,  0, 64)
palette[ 40] = rgb(255,  0,  0)
palette[ 41] = rgb(255, 64,  0)
palette[ 42] = rgb(255,125,  0)
palette[ 43] = rgb(255,190,  0)
palette[ 44] = rgb(255,255,  0)
palette[ 45] = rgb(190,255,  0)
palette[ 46] = rgb(125,255,  0)
palette[ 47] = rgb( 64,255,  0)
palette[ 48] = rgb(  0,255,  0)
palette[ 49] = rgb(  0,255, 64)
palette[ 50] = rgb(  0,255,125)
palette[ 51] = rgb(  0,255,190)
palette[ 52] = rgb(  0,255,255)
palette[ 53] = rgb(  0,190,255)
palette[ 54] = rgb(  0,125,255)
palette[ 55] = rgb(  0, 64,255)
palette[ 56] = rgb(125,125,255)
palette[ 57] = rgb(157,125,255)
palette[ 58] = rgb(190,125,255)
palette[ 59] = rgb(222,125,255)
palette[ 60] = rgb(255,125,255)
palette[ 61] = rgb(255,125,222)
palette[ 62] = rgb(255,125,190)
palette[ 63] = rgb(255,125,157)
palette[ 64] = rgb(255,125,125)
palette[ 65] = rgb(255,157,125)
palette[ 66] = rgb(255,190,125)
palette[ 67] = rgb(255,222,125)
palette[ 68] = rgb(255,255,125)
palette[ 69] = rgb(222,255,125)
palette[ 70] = rgb(190,255,125)
palette[ 71] = rgb(157,255,125)
palette[ 72] = rgb(125,255,125)
palette[ 73] = rgb(125,255,157)
palette[ 74] = rgb(125,255,190)
palette[ 75] = rgb(125,255,222)
palette[ 76] = rgb(125,255,255)
palette[ 77] = rgb(125,222,255)
palette[ 78] = rgb(125,190,255)
palette[ 79] = rgb(125,157,255)
palette[ 80] = rgb(182,182,255)
palette[ 81] = rgb(198,182,255)
palette[ 82] = rgb(218,182,255)
palette[ 83] = rgb(234,182,255)
palette[ 84] = rgb(255,182,255)
palette[ 85] = rgb(255,182,234)
palette[ 86] = rgb(255,182,218)
palette[ 87] = rgb(255,182,198)
palette[ 88] = rgb(255,182,182)
palette[ 89] = rgb(255,198,182)
palette[ 90] = rgb(255,218,182)
palette[ 91] = rgb(255,234,182)
palette[ 92] = rgb(255,255,182)
palette[ 93] = rgb(234,255,182)
palette[ 94] = rgb(218,255,182)
palette[ 95] = rgb(198,255,182)
palette[ 96] = rgb(182,255,182)
palette[ 97] = rgb(182,255,198)
palette[ 98] = rgb(182,255,218)
palette[ 99] = rgb(182,255,234)
palette[100] = rgb(182,255,255)
palette[101] = rgb(182,234,255)
palette[102] = rgb(182,218,255)
palette[103] = rgb(182,198,255)
palette[104] = rgb(  0,  0,113)
palette[105] = rgb( 28,  0,113)
palette[106] = rgb( 56,  0,113)
palette[107] = rgb( 85,  0,113)
palette[108] = rgb(113,  0,113)
palette[109] = rgb(113,  0, 85)
palette[110] = rgb(113,  0, 56)
palette[111] = rgb(113,  0, 28)
palette[112] = rgb(113,  0,  0)
palette[113] = rgb(113, 28,  0)
palette[114] = rgb(113, 56,  0)
palette[115] = rgb(113, 85,  0)
palette[116] = rgb(113,113,  0)
palette[117] = rgb( 85,113,  0)
palette[118] = rgb( 56,113,  0)
palette[119] = rgb( 28,113,  0)
palette[120] = rgb(  0,113,  0)
palette[121] = rgb(  0,113, 28)
palette[122] = rgb(  0,113, 56)
palette[123] = rgb(  0,113, 85)
palette[124] = rgb(  0,113,113)
palette[125] = rgb(  0, 85,113)
palette[126] = rgb(  0, 56,113)
palette[127] = rgb(  0, 28,113)
palette[128] = rgb( 56, 56,113)
palette[129] = rgb( 68, 56,113)
palette[130] = rgb( 85, 56,113)
palette[131] = rgb( 97, 56,113)
palette[132] = rgb(113, 56,113)
palette[133] = rgb(113, 56, 97)
palette[134] = rgb(113, 56, 85)
palette[135] = rgb(113, 56, 68)
palette[136] = rgb(113, 56, 56)
palette[137] = rgb(113, 68, 56)
palette[138] = rgb(113, 85, 56)
palette[139] = rgb(113, 97, 56)
palette[140] = rgb(113,113, 56)
palette[141] = rgb( 97,113, 56)
palette[142] = rgb( 85,113, 56)
palette[143] = rgb( 68,113, 56)
palette[144] = rgb( 56,113, 56)
palette[145] = rgb( 56,113, 68)
palette[146] = rgb( 56,113, 85)
palette[147] = rgb( 56,113, 97)
palette[148] = rgb( 56,113,113)
palette[149] = rgb( 56, 97,113)
palette[150] = rgb( 56, 85,113)
palette[151] = rgb( 56, 68,113)
palette[152] = rgb( 80, 80,113)
palette[153] = rgb( 89, 80,113)
palette[154] = rgb( 97, 80,113)
palette[155] = rgb(105, 80,113)
palette[156] = rgb(113, 80,113)
palette[157] = rgb(113, 80,105)
palette[158] = rgb(113, 80, 97)
palette[159] = rgb(113, 80, 89)
palette[160] = rgb(113, 80, 80)
palette[161] = rgb(113, 89, 80)
palette[162] = rgb(113, 97, 80)
palette[163] = rgb(113,105, 80)
palette[164] = rgb(113,113, 80)
palette[165] = rgb(105,113, 80)
palette[166] = rgb( 97,113, 80)
palette[167] = rgb( 89,113, 80)
palette[168] = rgb( 80,113, 80)
palette[169] = rgb( 80,113, 89)
palette[170] = rgb( 80,113, 97)
palette[171] = rgb( 80,113,105)
palette[172] = rgb( 80,113,113)
palette[173] = rgb( 80,105,113)
palette[174] = rgb( 80, 97,113)
palette[175] = rgb( 80, 89,113)
palette[176] = rgb(  0,  0, 64)
palette[177] = rgb( 16,  0, 64)
palette[178] = rgb( 32,  0, 64)
palette[179] = rgb( 48,  0, 64)
palette[180] = rgb( 64,  0, 64)
palette[181] = rgb( 64,  0, 48)
palette[182] = rgb( 64,  0, 32)
palette[183] = rgb( 64,  0, 16)
palette[184] = rgb( 64,  0,  0)
palette[185] = rgb( 64, 16,  0)
palette[186] = rgb( 64, 32,  0)
palette[187] = rgb( 64, 48,  0)
palette[188] = rgb( 64, 64,  0)
palette[189] = rgb( 48, 64,  0)
palette[190] = rgb( 32, 64,  0)
palette[191] = rgb( 16, 64,  0)
palette[192] = rgb(  0, 64,  0)
palette[193] = rgb(  0, 64, 16)
palette[194] = rgb(  0, 64, 32)
palette[195] = rgb(  0, 64, 48)
palette[196] = rgb(  0, 64, 64)
palette[197] = rgb(  0, 48, 64)
palette[198] = rgb(  0, 32, 64)
palette[199] = rgb(  0, 16, 64)
palette[200] = rgb( 32, 32, 64)
palette[201] = rgb( 40, 32, 64)
palette[202] = rgb( 48, 32, 64)
palette[203] = rgb( 56, 32, 64)
palette[204] = rgb( 64, 32, 64)
palette[205] = rgb( 64, 32, 56)
palette[206] = rgb( 64, 32, 48)
palette[207] = rgb( 64, 32, 40)
palette[208] = rgb( 64, 32, 32)
palette[209] = rgb( 64, 40, 32)
palette[210] = rgb( 64, 48, 32)
palette[211] = rgb( 64, 56, 32)
palette[212] = rgb( 64, 64, 32)
palette[213] = rgb( 56, 64, 32)
palette[214] = rgb( 48, 64, 32)
palette[215] = rgb( 40, 64, 32)
palette[216] = rgb( 32, 64, 32)
palette[217] = rgb( 32, 64, 40)
palette[218] = rgb( 32, 64, 48)
palette[219] = rgb( 32, 64, 56)
palette[220] = rgb( 32, 64, 64)
palette[221] = rgb( 32, 56, 64)
palette[222] = rgb( 32, 48, 64)
palette[223] = rgb( 32, 40, 64)
palette[224] = rgb( 44, 44, 64)
palette[225] = rgb( 48, 44, 64)
palette[226] = rgb( 52, 44, 64)
palette[227] = rgb( 60, 44, 64)
palette[228] = rgb( 64, 44, 64)
palette[229] = rgb( 64, 44, 60)
palette[230] = rgb( 64, 44, 52)
palette[231] = rgb( 64, 44, 48)
palette[232] = rgb( 64, 44, 44)
palette[233] = rgb( 64, 48, 44)
palette[234] = rgb( 64, 52, 44)
palette[235] = rgb( 64, 60, 44)
palette[236] = rgb( 64, 64, 44)
palette[237] = rgb( 60, 64, 44)
palette[238] = rgb( 52, 64, 44)
palette[239] = rgb( 48, 64, 44)
palette[240] = rgb( 44, 64, 44)
palette[241] = rgb( 44, 64, 48)
palette[242] = rgb( 44, 64, 52)
palette[243] = rgb( 44, 64, 60)
palette[244] = rgb( 44, 64, 64)
palette[245] = rgb( 44, 60, 64)
palette[246] = rgb( 44, 52, 64)
palette[247] = rgb( 44, 48, 64)
palette[248] = rgb(  0,  0,  0)
palette[249] = rgb(  0,  0,  0)
palette[250] = rgb(  0,  0,  0)
palette[251] = rgb(  0,  0,  0)
palette[252] = rgb(  0,  0,  0)
palette[253] = rgb(  0,  0,  0)
palette[254] = rgb(  0,  0,  0)
palette[255] = rgb(  0,  0,  0)

--

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Zaaphod
>Your palette looks like standard Int Mode 13h VGA palette (yes, I'm older). This are the RGB values (I'm quite sure):

Thank you, I appreciate the help identifying the format I have and the conversion to RGB.  I was able to also find methods to convert RGB to RGB565 and back by looking in  the aggpas pf_rgb565.inc file.

{ make_pix_565 }
function make_pix_565(r ,g ,b : unsigned ) : int16u;
begin
 result:=
  ((r and $F8 ) shl 8 ) or
  ((g and $FC ) shl 3 ) or
   (b shr 3 );

end;

{ make_color_565 }
procedure make_color_565(var color : aggclr; p : int16u_ptr );
begin
 color.ConstrInt(
  (p^ shr 8 ) and $F8 ,
  (p^ shr 3 ) and $FC ,
  (p^ shl 3 ) and $F8 );

end;  

James

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Implementing AggPas with PtcGraph

Zaaphod

I defined a static array to convert the mode 13h VGA palette to separate red, green and blue to send to aggpas as well as the packed RGB565 format needed to send to ptcgraph 16bit colors.

 

James

 

 

Type

   VGARGBRec= Record

      R,G,B:Byte;

      RGB:Word;

   end;

 

Const

   VGA256: Array[0..255] of VGARGBRec = (

      (R:$00; G:$00; B:$00; RGB:$0000),

      (R:$00; G:$00; B:$AA; RGB:$0015),

      (R:$00; G:$AA; B:$00; RGB:$0540),

      (R:$00; G:$AA; B:$AA; RGB:$0555),

      (R:$AA; G:$00; B:$00; RGB:$A800),

      (R:$AA; G:$00; B:$AA; RGB:$A815),

      (R:$AA; G:$55; B:$00; RGB:$AAA0),

      (R:$AA; G:$AA; B:$AA; RGB:$AD55),

      (R:$55; G:$55; B:$55; RGB:$52AA),

      (R:$55; G:$55; B:$FF; RGB:$52BF),

      (R:$55; G:$FF; B:$55; RGB:$57EA),

      (R:$55; G:$FF; B:$FF; RGB:$57FF),

      (R:$FF; G:$55; B:$55; RGB:$FAAA),

      (R:$FF; G:$55; B:$FF; RGB:$FABF),

      (R:$FF; G:$FF; B:$55; RGB:$FFEA),

      (R:$FF; G:$FF; B:$FF; RGB:$FFFF),

      (R:$00; G:$00; B:$00; RGB:$0000),

      (R:$14; G:$14; B:$14; RGB:$10A2),

      (R:$20; G:$20; B:$20; RGB:$2104),

      (R:$2C; G:$2C; B:$2C; RGB:$2965),

      (R:$38; G:$38; B:$38; RGB:$39C7),

      (R:$44; G:$44; B:$44; RGB:$4228),

      (R:$50; G:$50; B:$50; RGB:$528A),

      (R:$61; G:$61; B:$61; RGB:$630C),

      (R:$71; G:$71; B:$71; RGB:$738E),

      (R:$81; G:$81; B:$81; RGB:$8410),

      (R:$91; G:$91; B:$91; RGB:$9492),

      (R:$A1; G:$A1; B:$A1; RGB:$A514),

      (R:$B6; G:$B6; B:$B6; RGB:$B5B6),

      (R:$CA; G:$CA; B:$CA; RGB:$CE59),

      (R:$E2; G:$E2; B:$E2; RGB:$E71C),

      (R:$FF; G:$FF; B:$FF; RGB:$FFFF),

      (R:$00; G:$00; B:$FF; RGB:$001F),

      (R:$40; G:$00; B:$FF; RGB:$401F),

      (R:$7D; G:$00; B:$FF; RGB:$781F),

      (R:$BE; G:$00; B:$FF; RGB:$B81F),

      (R:$FF; G:$00; B:$FF; RGB:$F81F),

      (R:$FF; G:$00; B:$BE; RGB:$F817),

      (R:$FF; G:$00; B:$7D; RGB:$F80F),

      (R:$FF; G:$00; B:$40; RGB:$F808),

      (R:$FF; G:$00; B:$00; RGB:$F800),

      (R:$FF; G:$40; B:$00; RGB:$FA00),

      (R:$FF; G:$7D; B:$00; RGB:$FBE0),

      (R:$FF; G:$BE; B:$00; RGB:$FDE0),

      (R:$FF; G:$FF; B:$00; RGB:$FFE0),

      (R:$BE; G:$FF; B:$00; RGB:$BFE0),

      (R:$7D; G:$FF; B:$00; RGB:$7FE0),

      (R:$40; G:$FF; B:$00; RGB:$47E0),

      (R:$00; G:$FF; B:$00; RGB:$07E0),

      (R:$00; G:$FF; B:$40; RGB:$07E8),

      (R:$00; G:$FF; B:$7D; RGB:$07EF),

      (R:$00; G:$FF; B:$BE; RGB:$07F7),

      (R:$00; G:$FF; B:$FF; RGB:$07FF),

      (R:$00; G:$BE; B:$FF; RGB:$05FF),

      (R:$00; G:$7D; B:$FF; RGB:$03FF),

      (R:$00; G:$40; B:$FF; RGB:$021F),

      (R:$7D; G:$7D; B:$FF; RGB:$7BFF),

      (R:$9D; G:$7D; B:$FF; RGB:$9BFF),

      (R:$BE; G:$7D; B:$FF; RGB:$BBFF),

      (R:$DE; G:$7D; B:$FF; RGB:$DBFF),

      (R:$FF; G:$7D; B:$FF; RGB:$FBFF),

      (R:$FF; G:$7D; B:$DE; RGB:$FBFB),

      (R:$FF; G:$7D; B:$BE; RGB:$FBF7),

      (R:$FF; G:$7D; B:$9D; RGB:$FBF3),

      (R:$FF; G:$7D; B:$7D; RGB:$FBEF),

      (R:$FF; G:$9D; B:$7D; RGB:$FCEF),

      (R:$FF; G:$BE; B:$7D; RGB:$FDEF),

      (R:$FF; G:$DE; B:$7D; RGB:$FEEF),

      (R:$FF; G:$FF; B:$7D; RGB:$FFEF),

      (R:$DE; G:$FF; B:$7D; RGB:$DFEF),

      (R:$BE; G:$FF; B:$7D; RGB:$BFEF),

      (R:$9D; G:$FF; B:$7D; RGB:$9FEF),

      (R:$7D; G:$FF; B:$7D; RGB:$7FEF),

      (R:$7D; G:$FF; B:$9D; RGB:$7FF3),

      (R:$7D; G:$FF; B:$BE; RGB:$7FF7),

      (R:$7D; G:$FF; B:$DE; RGB:$7FFB),

      (R:$7D; G:$FF; B:$FF; RGB:$7FFF),

      (R:$7D; G:$DE; B:$FF; RGB:$7EFF),

      (R:$7D; G:$BE; B:$FF; RGB:$7DFF),

      (R:$7D; G:$9D; B:$FF; RGB:$7CFF),

      (R:$B6; G:$B6; B:$FF; RGB:$B5BF),

      (R:$C6; G:$B6; B:$FF; RGB:$C5BF),

      (R:$DA; G:$B6; B:$FF; RGB:$DDBF),

      (R:$EA; G:$B6; B:$FF; RGB:$EDBF),

      (R:$FF; G:$B6; B:$FF; RGB:$FDBF),

      (R:$FF; G:$B6; B:$EA; RGB:$FDBD),

      (R:$FF; G:$B6; B:$DA; RGB:$FDBB),

      (R:$FF; G:$B6; B:$C6; RGB:$FDB8),

      (R:$FF; G:$B6; B:$B6; RGB:$FDB6),

      (R:$FF; G:$C6; B:$B6; RGB:$FE36),

      (R:$FF; G:$DA; B:$B6; RGB:$FED6),

      (R:$FF; G:$EA; B:$B6; RGB:$FF56),

      (R:$FF; G:$FF; B:$B6; RGB:$FFF6),

      (R:$EA; G:$FF; B:$B6; RGB:$EFF6),

      (R:$DA; G:$FF; B:$B6; RGB:$DFF6),

      (R:$C6; G:$FF; B:$B6; RGB:$C7F6),

      (R:$B6; G:$FF; B:$B6; RGB:$B7F6),

      (R:$B6; G:$FF; B:$C6; RGB:$B7F8),

      (R:$B6; G:$FF; B:$DA; RGB:$B7FB),

      (R:$B6; G:$FF; B:$EA; RGB:$B7FD),

      (R:$B6; G:$FF; B:$FF; RGB:$B7FF),

      (R:$B6; G:$EA; B:$FF; RGB:$B75F),

      (R:$B6; G:$DA; B:$FF; RGB:$B6DF),

      (R:$B6; G:$C6; B:$FF; RGB:$B63F),

      (R:$00; G:$00; B:$71; RGB:$000E),

      (R:$1C; G:$00; B:$71; RGB:$180E),

      (R:$38; G:$00; B:$71; RGB:$380E),

      (R:$55; G:$00; B:$71; RGB:$500E),

      (R:$71; G:$00; B:$71; RGB:$700E),

      (R:$71; G:$00; B:$55; RGB:$700A),

      (R:$71; G:$00; B:$38; RGB:$7007),

      (R:$71; G:$00; B:$1C; RGB:$7003),

      (R:$71; G:$00; B:$00; RGB:$7000),

      (R:$71; G:$1C; B:$00; RGB:$70E0),

      (R:$71; G:$38; B:$00; RGB:$71C0),

      (R:$71; G:$55; B:$00; RGB:$72A0),

      (R:$71; G:$71; B:$00; RGB:$7380),

      (R:$55; G:$71; B:$00; RGB:$5380),

      (R:$38; G:$71; B:$00; RGB:$3B80),

      (R:$1C; G:$71; B:$00; RGB:$1B80),

      (R:$00; G:$71; B:$00; RGB:$0380),

      (R:$00; G:$71; B:$1C; RGB:$0383),

      (R:$00; G:$71; B:$38; RGB:$0387),

      (R:$00; G:$71; B:$55; RGB:$038A),

      (R:$00; G:$71; B:$71; RGB:$038E),

      (R:$00; G:$55; B:$71; RGB:$02AE),

      (R:$00; G:$38; B:$71; RGB:$01CE),

      (R:$00; G:$1C; B:$71; RGB:$00EE),

      (R:$38; G:$38; B:$71; RGB:$39CE),

      (R:$44; G:$38; B:$71; RGB:$41CE),

      (R:$55; G:$38; B:$71; RGB:$51CE),

      (R:$61; G:$38; B:$71; RGB:$61CE),

      (R:$71; G:$38; B:$71; RGB:$71CE),

      (R:$71; G:$38; B:$61; RGB:$71CC),

      (R:$71; G:$38; B:$55; RGB:$71CA),

      (R:$71; G:$38; B:$44; RGB:$71C8),

      (R:$71; G:$38; B:$38; RGB:$71C7),

      (R:$71; G:$44; B:$38; RGB:$7227),

      (R:$71; G:$55; B:$38; RGB:$72A7),

      (R:$71; G:$61; B:$38; RGB:$7307),

      (R:$71; G:$71; B:$38; RGB:$7387),

      (R:$61; G:$71; B:$38; RGB:$6387),

      (R:$55; G:$71; B:$38; RGB:$5387),

      (R:$44; G:$71; B:$38; RGB:$4387),

      (R:$38; G:$71; B:$38; RGB:$3B87),

      (R:$38; G:$71; B:$44; RGB:$3B88),

      (R:$38; G:$71; B:$55; RGB:$3B8A),

      (R:$38; G:$71; B:$61; RGB:$3B8C),

      (R:$38; G:$71; B:$71; RGB:$3B8E),

      (R:$38; G:$61; B:$71; RGB:$3B0E),

      (R:$38; G:$55; B:$71; RGB:$3AAE),

      (R:$38; G:$44; B:$71; RGB:$3A2E),

      (R:$50; G:$50; B:$71; RGB:$528E),

      (R:$59; G:$50; B:$71; RGB:$5A8E),

      (R:$61; G:$50; B:$71; RGB:$628E),

      (R:$69; G:$50; B:$71; RGB:$6A8E),

      (R:$71; G:$50; B:$71; RGB:$728E),

      (R:$71; G:$50; B:$69; RGB:$728D),

      (R:$71; G:$50; B:$61; RGB:$728C),

      (R:$71; G:$50; B:$59; RGB:$728B),

      (R:$71; G:$50; B:$50; RGB:$728A),

      (R:$71; G:$59; B:$50; RGB:$72CA),

      (R:$71; G:$61; B:$50; RGB:$730A),

      (R:$71; G:$69; B:$50; RGB:$734A),

      (R:$71; G:$71; B:$50; RGB:$738A),

      (R:$69; G:$71; B:$50; RGB:$6B8A),

      (R:$61; G:$71; B:$50; RGB:$638A),

      (R:$59; G:$71; B:$50; RGB:$5B8A),

      (R:$50; G:$71; B:$50; RGB:$538A),

      (R:$50; G:$71; B:$59; RGB:$538B),

      (R:$50; G:$71; B:$61; RGB:$538C),

      (R:$50; G:$71; B:$69; RGB:$538D),

      (R:$50; G:$71; B:$71; RGB:$538E),

      (R:$50; G:$69; B:$71; RGB:$534E),

      (R:$50; G:$61; B:$71; RGB:$530E),

      (R:$50; G:$59; B:$71; RGB:$52CE),

      (R:$00; G:$00; B:$40; RGB:$0008),

      (R:$10; G:$00; B:$40; RGB:$1008),

      (R:$20; G:$00; B:$40; RGB:$2008),

      (R:$30; G:$00; B:$40; RGB:$3008),

      (R:$40; G:$00; B:$40; RGB:$4008),

      (R:$40; G:$00; B:$30; RGB:$4006),

      (R:$40; G:$00; B:$20; RGB:$4004),

      (R:$40; G:$00; B:$10; RGB:$4002),

      (R:$40; G:$00; B:$00; RGB:$4000),

      (R:$40; G:$10; B:$00; RGB:$4080),

      (R:$40; G:$20; B:$00; RGB:$4100),

      (R:$40; G:$30; B:$00; RGB:$4180),

      (R:$40; G:$40; B:$00; RGB:$4200),

      (R:$30; G:$40; B:$00; RGB:$3200),

      (R:$20; G:$40; B:$00; RGB:$2200),

      (R:$10; G:$40; B:$00; RGB:$1200),

      (R:$00; G:$40; B:$00; RGB:$0200),

      (R:$00; G:$40; B:$10; RGB:$0202),

      (R:$00; G:$40; B:$20; RGB:$0204),

      (R:$00; G:$40; B:$30; RGB:$0206),

      (R:$00; G:$40; B:$40; RGB:$0208),

      (R:$00; G:$30; B:$40; RGB:$0188),

      (R:$00; G:$20; B:$40; RGB:$0108),

      (R:$00; G:$10; B:$40; RGB:$0088),

      (R:$20; G:$20; B:$40; RGB:$2108),

      (R:$28; G:$20; B:$40; RGB:$2908),

      (R:$30; G:$20; B:$40; RGB:$3108),

      (R:$38; G:$20; B:$40; RGB:$3908),

      (R:$40; G:$20; B:$40; RGB:$4108),

      (R:$40; G:$20; B:$38; RGB:$4107),

      (R:$40; G:$20; B:$30; RGB:$4106),

      (R:$40; G:$20; B:$28; RGB:$4105),

      (R:$40; G:$20; B:$20; RGB:$4104),

      (R:$40; G:$28; B:$20; RGB:$4144),

      (R:$40; G:$30; B:$20; RGB:$4184),

      (R:$40; G:$38; B:$20; RGB:$41C4),

      (R:$40; G:$40; B:$20; RGB:$4204),

      (R:$38; G:$40; B:$20; RGB:$3A04),

      (R:$30; G:$40; B:$20; RGB:$3204),

      (R:$28; G:$40; B:$20; RGB:$2A04),

      (R:$20; G:$40; B:$20; RGB:$2204),

      (R:$20; G:$40; B:$28; RGB:$2205),

      (R:$20; G:$40; B:$30; RGB:$2206),

      (R:$20; G:$40; B:$38; RGB:$2207),

      (R:$20; G:$40; B:$40; RGB:$2208),

      (R:$20; G:$38; B:$40; RGB:$21C8),

      (R:$20; G:$30; B:$40; RGB:$2188),

      (R:$20; G:$28; B:$40; RGB:$2148),

      (R:$2C; G:$2C; B:$40; RGB:$2968),

      (R:$30; G:$2C; B:$40; RGB:$3168),

      (R:$34; G:$2C; B:$40; RGB:$3168),

      (R:$3C; G:$2C; B:$40; RGB:$3968),

      (R:$40; G:$2C; B:$40; RGB:$4168),

      (R:$40; G:$2C; B:$3C; RGB:$4167),

      (R:$40; G:$2C; B:$34; RGB:$4166),

      (R:$40; G:$2C; B:$30; RGB:$4166),

      (R:$40; G:$2C; B:$2C; RGB:$4165),

      (R:$40; G:$30; B:$2C; RGB:$4185),

      (R:$40; G:$34; B:$2C; RGB:$41A5),

      (R:$40; G:$3C; B:$2C; RGB:$41E5),

      (R:$40; G:$40; B:$2C; RGB:$4205),

      (R:$3C; G:$40; B:$2C; RGB:$3A05),

      (R:$34; G:$40; B:$2C; RGB:$3205),

      (R:$30; G:$40; B:$2C; RGB:$3205),

      (R:$2C; G:$40; B:$2C; RGB:$2A05),

      (R:$2C; G:$40; B:$30; RGB:$2A06),

      (R:$2C; G:$40; B:$34; RGB:$2A06),

      (R:$2C; G:$40; B:$3C; RGB:$2A07),

      (R:$2C; G:$40; B:$40; RGB:$2A08),

      (R:$2C; G:$3C; B:$40; RGB:$29E8),

      (R:$2C; G:$34; B:$40; RGB:$29A8),

      (R:$2C; G:$30; B:$40; RGB:$2988),

      (R:$00; G:$00; B:$00; RGB:$0000),

      (R:$00; G:$00; B:$00; RGB:$0000),

      (R:$00; G:$00; B:$00; RGB:$0000),

      (R:$00; G:$00; B:$00; RGB:$0000),

      (R:$00; G:$00; B:$00; RGB:$0000),

      (R:$00; G:$00; B:$00; RGB:$0000),

      (R:$00; G:$00; B:$00; RGB:$0000),

      (R:$00; G:$00; B:$00; RGB:$0000));

 


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
123456