Hi,
In TImage, I show photos. Can I draw something on top of a photo (for example, cross it out) ?
Hi,
In TImage, I show photos. Can I draw something on top of a photo (for example, cross it out) ?

@ 450, 455 XIMAGE oImage3 SOURCE cBackImage  SIZE 130, 95 OF oFld1:aDialogs[ 2 ]
oImage3:nUserControl := 0 // disable actions
oImage3:lBmpTransparent := !(Lower( cFileExt( c_Path1 + cBackImage, Â ) ) $ "jpg,jpeg") // disable transparent in JPG
oImage3:bChange := { || oImage3:lBmpTransparent := ;
   !(Lower( cFileExt( c_Path1 + cBackImage,  ) ) $ "jpg,jpeg"), ;
  oImage3:Refresh() }
//FREE_LINE(Object, hDC, nTop, nLeft, nBottom, nRight, nLineType, nColor, nPensize, nTransp )
oImage3:bPainted   := < |hDC| Â
    FREE_LINE(oImage3, hDC, 10, 10, 80, 120, 1, 255, 8, 255 )
    FREE_LINE(oImage3, hDC, 10, 120, 80, 10, 1, 255, 8, 255 )
    RETURN NIL
>
...
...
// -------------- normal or glowing lines
FUNCTION FREE_LINE(Object, hDC, nTop, nLeft, nBottom, nRight, nLineType, nColor, nPensize, nTransp )
LOCAL oGraphics, oPen, nRed, nGreen, nBlue
LOCAL n, nPen
Â
oGraphics    := Graphics():New( hDC )
nRed       := nRGBRed( nColor )
nGreen      := nRGBGreen( nColor )
nBlue      := nRGBBlue( nColor )
IF nLineType = 1 Â Â Â Â // line
    oPen       := Pen():New( nTransp, nRed, nGreen, nBlue, nPensize )
    oGraphics:DrawLine( oPen, nLeft, nTop, nRight, nBottom ) // oPen , nLeft, nTop, nRight, nBottom
ELSE Â Â Â Â Â Â Â Â Â Â // glow
    nPen        := nPensize * 0.5
    nTransp      := 255
    oPen        := Pen():New( nTransp, nRed, nGreen, nBlue, nPen )
    Â
    FOR n = 1 to 6
        oGraphics:DrawLine( oPen, nLeft, nTop, nRight, nBottom ) // oPen , nLeft, nTop, nRight, nBottom
        nTop   := nTop - nPen Â
        nLeft  := nLeft - nPen Â
        nRight  := nRight + 2 * nPen Â
        nBottom := nBottom + 2 * nPen
        nTransp  := nTransp - 41
        oPen:setcolor( nTransp, nRed, nGreen, nBlue ) // transparent change
    NEXT  Â
ENDIF
oPen:Destroy()
oGraphics:Destroy()
RETURN NILThanks, this is what I need !
oImage:bPainted   := < |hDC| Â
    nHeight := oImage:nHeight - 20
    nWidth := oImage:nWidth - 10
    FREE_LINE(oImage, hDC, 10, 10, nHeight, nWidth, 2, 255, 4, 255 )
    FREE_LINE(oImage, hDC, 10, nWidth, nHeight, 10, 2, 255, 4, 255 )
// Â Â Â FREE_LINE(oImage, hDC, 10, 10, 80, 120, 2, 255, 4, 255 )
// Â Â Â FREE_LINE(oImage, hDC, 10, 120, 80, 10, 2, 255, 4, 255 )
    RETURN NIL
>

IF nLineType = 1 Â Â Â Â // line
    oPen       := Pen():New( nTransp, nRed, nGreen, nBlue, nPensize )
    oGraphics:DrawLine( oPen, nLeft, nTop, nRight, nBottom ) // oPen , nLeft, nTop, nRight, nBottom
ELSE Â Â Â Â Â Â Â Â Â Â // glow
    nPen        := nPensize * 0.5
    nTransp      := 255
    oPen        := Pen():New( nTransp, nRed, nGreen, nBlue, nPen )
    Â
    FOR n = 1 to 6
        oGraphics:DrawLine( oPen, nLeft, nTop, nRight, nBottom ) // oPen , nLeft, nTop, nRight, nBottom
        nTop   := nTop + nPen Â
        nBottom := nBottom + nPen
        nTransp  := nTransp - 41
        oPen:setcolor( nTransp, nRed, nGreen, nBlue ) // transparent change
    NEXT