Results 1 to 7 of 7

Thread: Different RGB's

  1. #1

    Different RGB's

    Is there way to draw white picture with different color?
    www.netsoccer.biz

  2. #2

    Different RGB's

    I think you need to explain that a bit more as I (and probably more of us) do not understand with you mean by that.

  3. #3

    Different RGB's

    Yes, sorry for lack of explaining. I'm quite poor in english, so this is hard.

    I've been working soccer game, where shirts, pants, socks etc is in white colori. I'm using currently omega components, where I can draw white shirt ie. to red.

    So I was wondering, how it works with DelphiX.

    Here is original sprite picture.
    http://pp.kpnet.fi/kmje/shirts1.png

    And this, what I'm looking for. (drawing it to different RGB)
    http://www.netsoccer.biz/screenshot1.gif
    www.netsoccer.biz

  4. #4

    Different RGB's

    I don't understand you well, but I think than you want use one set of pictures and recolor it on fly.

    When it is right, you can use function (and other similar) for drawing like

    Code:
        procedure DrawAlphaCol(Dest: TDirectDrawSurface; const DestRect: TRect; PatternIndex: Integer;
          Color: Integer; Alpha: Integer{$IFDEF DelphiX_Spt4} = 255{$ENDIF});
    where Color is parameter for set color of vertex as well and set color for drawing like

    Code:
    Color := DXDraw.Surface.ColorMatch(clYellow);
    But I no tried it, sorry.
    Ijcro.

  5. #5

    Different RGB's

    Thanks, I got it working.

    Code:
    dxImageList1.Items[0].DrawAddCol(DXDraw1.Surface, Bounds(10, 10, 20, 20),0,RGB(50, 150, 50), 255);
    www.netsoccer.biz

  6. #6

    Different RGB's

    Additive drawing for clothes? Use DrawAlpha at 255

  7. #7

    Different RGB's

    I am sorry, so I think that I forgot simple draw with vertex coloring... ops:
    Ijcro.

Bookmarks

Posting Permissions

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