Sign in to follow this  
Followers 0
anixon

Transparency

3 posts in this topic

My digital camera produces a date time stamp which is a gold letter superimposed over a black letter the black letter being slightly bigger then the gold one. This guarantees that the stamp will appear as bold irrespective of the background color of the photograph/image.

I am guessing that this is a type of font which I have not been able to identify.

The following script produces a window with a label which by default appears in a box the size of which is controlled by the GUICtrlCreateLabel statement.

What I would like to be able to achieve is the background Black Letter with the option to have either a Red or Gold letter superimposed over it with the text sitting on top of the image like the camera's date time stamp rather than in a label box.

This is the code that I am seeking to modify:

CODE
Func displayImage()

;Process and Display image files for display

GUICtrlCreatePic($dImageDP,265,12,220,258)

GUISetFont(8, 600, 1, $font)

$filenameL = StringLen(" " & $CFileE[1] & "." & $CfILEe[2] & " ") * 6

GUICtrlCreateLabel(" " & $CFileE[1] & "." & $CfILEe[2], 270, 17, $filenameL, 16)

GUISetFont(10, 400, 1, $font)

If $eBlackF = 1 Then

GUICtrlSetColor(-1, 0x000000) ; Black

ElseIf $eRedF = 1 Then

GUICtrlSetColor(-1, 0xff0000) ; Red

ElseIf $eGoldF = 1 Then

GUICtrlSetColor(-1, 0xf29f24) ; Gold

EndIf

EndFunc

Help is always appreciated...

Ant..

Share this post


Link to post
Share on other sites

GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
Thanks for the direction this is the modified script which works just perfectly

CODE
Func displayImage()

$Split = StringSplit($iFiles, "|")

If $di = 1 Then

$dImageD = $Split[1]

$di = 0

EndIf

$dImageDP = $dImageD & "\" & $cFileE[1] & "." & $cFileE[2]

GUICtrlCreatePic("", 265, 12, 220, 258)

GUICtrlSetImage(-1, $dImageDP, -1, 4)

GUISetFont(8, 600, 1, $font)

$filenameL = StringLen(" " & $cFileE[1] & "." & $cFileE[2] & " ") * 6

GUICtrlCreateLabel(" " & $cFileE[1] & "." & $cFileE[2], 270, 17, $filenameL, 16)

GUISetFont(10, 400, 1, $font)

GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

If $eBlackF = 1 Then

GUICtrlSetColor(-1, 0x000000) ; Black

ElseIf $eRedF = 1 Then

GUICtrlSetColor(-1, 0xff0000) ; Red

ElseIf $eGoldF = 1 Then

GUICtrlSetColor(-1, 0xf29f24) ; Gold

EndIf

EndFunc ;==>displayImage

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0