Diagonal lines

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #37910
    Pedro-Juan
    Participant

    XE7, AC 11.16, Win 8.1

    Hello,

    There is a component (like sShape or sBevel) with which I can draw lines in any direction?

    That is, not only vertical and horizontal, but also diagonal lines at different angles.

    Thank you very much.

    #58291
    Support
    Keymaster

    Hello

    There is no such special component, but you can use a PaintBox, I think.

    You can use the acgpDrawLine procedure which is declared in the acgpUtils unit:

    Code:
    procedure acgpDrawLine (DC: hdc; X1, Y1, X2, Y2: Single; Color: TColor; PenWidth: Single = 1);

    This procedure paints antialiased lines.

    #59633
    SzakiLaci
    Participant
    'Support' wrote:

    You can use the acgpDrawLine procedure which is declared in the acgpUtils unit:

    Code:
    procedure acgpDrawLine (DC: hdc; X1, Y1, X2, Y2: Single; Color: TColor; PenWidth: Single = 1);

    This procedure paints antialiased lines.

    Hi,

    Is there any version of this that is drawing this line with alpha-channel blended? [TColor >> TsColor]

    I would like to draw a big RED diagonal line on “deleted” ikons with white “shadow”.

    Or is it faster if I pre-create this image and simply “overdraw” the original (=merge it) every time?

    (If yes >> how?)

    #59636
    Support
    Keymaster

    Color is 32-bit color there (with Alpha channel) if I'm not wrong.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.