sokolovska
Новичок
- Сообщения
- 36
- Репутация
- 0
Подскажите пожалуйста, очень васпрошу, как тут сделать так, чтобы ватермак был в нижнем правом углу (или левом) - не могу понять как его "двигать"
заранее спасибо вам
заранее спасибо вам
Код:
; Initialize GDI+ library
_GDIPlus_Startup()
; Capture screen
;$hBitmap = _ScreenCapture_Capture(@MyDocumentsDir & '\AutoItImage.bmp')
; Load image and emboss text
$hImage = _GDIPlus_ImageLoadFromFile('D:\Development\1.jpg')
$hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage)
$hFamily = _GDIPlus_FontFamilyCreate("Georgia")
$hFont = _GDIPlus_FontCreate($hFamily, 16, 1)
$tLayout = _GDIPlus_RectFCreate(0, 0)
$hFormat = _GDIPlus_StringFormatCreate(2)
$hBrush1 = _GDIPlus_BrushCreateSolid(0xA2FFFFFF)
$hBrush2 = _GDIPlus_BrushCreateSolid(0xC4FF0000)
$hPen = _GDIPlus_PenCreate(0xC4000000, 2)
$aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $sString, $hFont, $tLayout, $hFormat)
$iWidth = DllStructGetData($aInfo[0], "Width")
$iHeight = DllStructGetData($aInfo[0], "Height")
_GDIPlus_GraphicsFillRect($hGraphic, 0, 0, $iWidth, $iHeight, $hBrush1)
_GDIPlus_GraphicsDrawRect($hGraphic, 1, 1, $iWidth, $iHeight, $hPen)
_GDIPlus_GraphicsDrawStringEx($hGraphic, $sString, $hFont, $aInfo[0], $hFormat, $hBrush2)
; Save image
_GDIPlus_ImageSaveToFile($hImage, 'D:\Development\1111.jpg')
; Free resources
_GDIPlus_PenDispose($hPen)
_GDIPlus_BrushDispose($hBrush1)
_GDIPlus_BrushDispose($hBrush2)
_GDIPlus_StringFormatDispose($hFormat)
_GDIPlus_FontDispose($hFont)
_GDIPlus_FontFamilyDispose($hFamily)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_Shutdown()
ShellExecute('D:\Development\1111.jpg')