Results 1 to 3 of 3

Thread: TColor and dxDraw1.Surface.Fill

  1. #1

    TColor and dxDraw1.Surface.Fill

    Hi ho again guys

    Whats the story regarding dxdraw and color allocation??

    If I use a standard TColor value in the form of say
    var back_col: TColor;

    back_col := $00XXXXXX; // ( some desired color)

    then it does not display the correct color

    I have tried setting the high order byte to the various values allowed such as 00 or 01 or 02 ...

    am using a 800 X 600 screen and have tried the different color resolutions like 16 and 24

    anyway the desired action is to be able to set the background to a particular desired color.... How ??

    cheeeeeeeeeeerrrrrrrrrssssssssssss ato
    The Universe is all right here!!!

  2. #2

    TColor and dxDraw1.Surface.Fill


    You need to use the DXDraw.Surface.ColorMatch function to convert the TColor value to the value used by DirectDraw.
    [pascal]DXDraw.Surface.Fill(DXDraw.Surface.ColorMatch(back _col));[/pascal]
    However, the ColorMatch method is quite slow IIRC, so you might find it better to do the conversion only once and store it until required.
    [size=10px][ Join us in #pgd on ] [ Sign the Petition for a Software Patent Free Europe ][/size]

  3. #3

    TColor and dxDraw1.Surface.Fill

    Yo ho ho Useless Hacker,,,

    THX that werks well...

    cheeeeeeeeerrrrrrrssssssssss ato
    The Universe is all right here!!!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Comodo SSL