Jump to content
Sign in to follow this  
Authenticity

GDIP.au3

Recommended Posts

Here are a few image convolution methods written using Christian Graus's source and examples over here, thanks ;). Need to rewrite the DLL file.

Edit: 21.07.2010

Rewrote the function in assembly so it doesn't require the DLL file anymore.

Instead, you need to download Fasm written by Ward.

Thanks Ward <3

Example:

#include "Convolution.au3"
#include <ScreenCapture.au3>

_GDIPlus_Startup()

Local $hBmp, $hBitmap, $hEmboss

$hBmp = _ScreenCapture_Capture("", 0, 0, -1, -1, False)
$hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hBmp)
_WinAPI_DeleteObject($hBmp)

$hEmboss = _Image_Emboss($hBitmap, $VertOnly)

If $hEmboss Then
    _GDIPlus_ImageSaveToFile($hEmboss, @ScriptDir & "\VertEmbossed.png")
    _GDIPlus_ImageDispose($hEmboss)
    ShellExecute(@ScriptDir & "\VertEmbossed.png")
EndIf

_GDIPlus_BitmapDispose($hBitmap)

_GDIPlus_Shutdown()

For each of the filter functions, you can supply counter value. The counter value specifies how many times to execute the convolution matrix against the image.

Convolution.au3

Edited by Authenticity

Share this post


Link to post
Share on other sites

Just to say that I tried that script on XP couple of minutes ago before switching to Vista and it wasn't working there (as some other examples). Could you add some message box or something to show when failure happen, at least when you expect one for some systems.

That's expected?

Vista is just fine of course.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Short report from XP.

Confusion with new BETA (strange, strange):

_GDIPlus_GraphicsFillRectangles.au3

_GDIPlus_GraphicsFillRegion.au3

_GDIPlus_GraphicsFillPolygon2.au3

_GDIPlus_GraphicsFillPath.au3

_GDIPlus_GraphicsFillClosedCurve2.au3

_GDIPlus_GraphicsDrawRectangles.au3

_GDIPlus_GraphicsDrawPath.au3

_GDIPlus_GraphicsDrawLines.au3

_GDIPlus_GraphicsDrawCurve3.au3

_GDIPlus_GraphicsDrawCurve2.au3

_GDIPlus_GraphicsDrawClosedCurve2.au3

_GDIPlus_GraphicsDrawBeziers.au3

_GDIPlus_CustomLineCapSetWidthScale.au3

_GDIPlus_CustomLineCapSetStrokeJoin.au3

_GDIPlus_CustomLineCapSetStrokeCaps.au3

_GDIPlus_CustomLineCapSetBaseInset.au3

_GDIPlus_CustomLineCapSetBaseCap.au3

_GDIPlus_CustomLineCapGetWidthScale.au3

_GDIPlus_CustomLineCapGetStrokeJoin.au3

_GDIPlus_CustomLineCapGetStrokeCaps.au3

_GDIPlus_CustomLineCapGetBaseInset.au3

_GDIPlus_CustomLineCapGetBaseCap.au3

_GDIPlus_CustomLineCapCreate.au3

_GDIPlus_CustomLineCapClone.au3

_GDIPlus_BitmapCreateFromScan0.au3

Not working:

_GDIPlus_BitmapCreateFromResource.au3 - no such resource on XP

_GDIPlus_BitmapCreateFromStream.au3

_GDIPlus_BitmapCreateFromGdiDib.au3

That's it. Didn't try to find the cause so there is a possibility it's just me. Will see if someone else reports the same.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Powerful stuff, your UDF has exceeded the size of my WinAPIEx.au3. ;) You did a great job.

One remark. Functions like _GDIPlus_BitmapSetPixel() may crash the script, if pixel coordinates are outside the image. I found this in my 3D Axis program. Maybe better to check the coordinates of pixel before calling the DllCall()?

Thanks.

PS

Posted ImagePosted ImagePosted ImagePosted ImagePosted Image from me for a really professional job.

Edited by Yashied

Share this post


Link to post
Share on other sites

Hi!

Examples run, on my computer, only if I replace several function's names par '_'+function's name:

_GDIPlus_PenDefCreate by __GDIPlus_PenDefCreate

_GDIPlus_PenDefDispose by __GDIPlus_PenDefDispose

_GDIPlus_BrushDefCreate by __GDIPlus_BrushDefCreate

_GDIPlus_BrushDefDispose by __GDIPlus_BrushDefDispose

is it normal?

(I use autoit 3.3.2.0 and Windows 7-32)

And also, the path for GdiPlus.dll is different

(%windir%\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.7600.16385_none_83ab0ddaed0c4c23)

Edited by Michel Claveau

Share this post


Link to post
Share on other sites

Thx for the UDF, but I have a request.

Could you please remove the _WinAPI_...-functions from it? I'd like to use this UDF together with WinApiEx and the functions are already defined there.

In my opinion, this GDIp.au3 should only contain _GDIPlus_... functions and not WinApi.


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

One year without comments... It would be good continue this project, maybe some of us can make these functions worthy to be part of the AutoIt oficial distribution

I offer to test write examples for this library.

Share this post


Link to post
Share on other sites

One year without comments... It would be good continue this project, maybe some of us can make these functions worthy to be part of the AutoIt oficial distribution

I offer to test write examples for this library.

Yes please,see post 171

Edited by Lakes

2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

two years without comments on this wonderful project.

to make the new gdip functions work on XP, i found a working and relatively simple method described >here.

an example script that includes gdip color manipulations and the convolution methods described above can be found >here.


[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites

Hey guys! I just wondered why there is a function to create a saturation matrix, but none for contrast and brightness - so i've written one based on the saturation-code - you may add it to your amazing library!

; #FUNCTION# ====================================================================================================================
; Name...........: _GDIPlus_ColorMatrixCreateContrast
; Description ...: Creates and initializes a contrast color matrix
; Syntax.........: _GDIPlus_ColorMatrixCreateContrast($nCon)
; Parameters ....: $nCon - Color contrast factor
; Return values .: Success      - $tagGDIPCOLORMATRIX structure that contains a contrast color matrix
;                  Failure      - 0
; Related .......: $tagGDIPCOLORMATRIX
; Author ........: Daniel Jaeger - http://nerdworld.de
; Example .......; No
; ===============================================================================================================================
Func _GDIPlus_ColorMatrixCreateContrast($nCon)

    Local $tCM = DllStructCreate($tagGDIPCOLORMATRIX), $nT = (1 - $nCon) / 2

    DllStructSetData($tCM, "m", $nCon, 1)
    DllStructSetData($tCM, "m", $nCon, 7)
    DllStructSetData($tCM, "m", $nCon, 13)

    DllStructSetData($tCM, "m", 1, 19)

    DllStructSetData($tCM, "m", $nT, 21)
    DllStructSetData($tCM, "m", $nT, 22)
    DllStructSetData($tCM, "m", $nT, 23)

    DllStructSetData($tCM, "m", 1, 25)

    Return $tCM
EndFunc

Edit: Added the same function for brightness and removed some useless lines.

; #FUNCTION# ====================================================================================================================
; Name...........: _GDIPlus_ColorMatrixCreateBrightness
; Description ...: Creates and initializes a brightness color matrix
; Syntax.........: _GDIPlus_ColorMatrixCreateBrightness($nBri)
; Parameters ....: $nCon - Color brightness factor
; Return values .: Success - $tagGDIPCOLORMATRIX structure that contains a brightness color matrix
; Failure - 0
; Related .......: $tagGDIPCOLORMATRIX
; Author ........: Daniel Jaeger - http://nerdworld.de
; Example .......; No
; ===============================================================================================================================

Func _GDIPlus_ColorMatrixCreateBrightness($nBri)

    Local $tCM = DllStructCreate($tagGDIPCOLORMATRIX)

    DllStructSetData($tCM, "m", 1, 1)
    DllStructSetData($tCM, "m", 1, 7)
    DllStructSetData($tCM, "m", 1, 13)
    DllStructSetData($tCM, "m", 1, 19)

    DllStructSetData($tCM, "m", $nBri-1, 21)
    DllStructSetData($tCM, "m", $nBri-1, 22)
    DllStructSetData($tCM, "m", $nBri-1, 23)

    DllStructSetData($tCM, "m", 1, 25)

    Return $tCM
EndFunc

Edit: Example code

#include <GDIP.au3>
#include <GUIConstants.au3>

_GDIPlus_Startup()

$hGUI = GUICreate("Test", 380, 300)
GUISetBkColor(0x00C080)

$hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI)
$hBitmap = _GDIPlus_ImageLoadFromFile("test.jpg")

Local $matrix = _GDIPlus_ColorMatrixCreate()
;Local $matrix = _GDIPlus_ColorMatrixCreateNegative()

Local $brightness = _GDIPlus_ColorMatrixCreateBrightness(1.5)
_GDIPlus_ColorMatrixMultiply($matrix, $brightness)

Local $contrast = _GDIPlus_ColorMatrixCreateContrast(2)
_GDIPlus_ColorMatrixMultiply($matrix, $contrast)

Local $saturation = _GDIPlus_ColorMatrixCreateSaturation(0.5)
_GDIPlus_ColorMatrixMultiply($matrix, $saturation)

$hIA = _GDIPlus_ImageAttributesCreate()
_GDIPlus_ImageAttributesSetColorMatrix($hIA, 0, True, DllStructGetPtr($matrix))

GUISetState()

_GDIPlus_GraphicsDrawImageRectRectIA($hGraphics, $hBitmap, 0, 0, 380, 300, 0, 0, 380, 300, $hIA)

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE

_GDIPlus_ImageAttributesDispose($hIA)
_GDIPlus_ImageDispose($hBitmap)
_GDIPlus_GraphicsDispose($hGraphics)

_GDIPlus_Shutdown()

Regards, Daniel

Edited by Nerdworld

Share this post


Link to post
Share on other sites

Should be already available in the latest beta (GDIPlus.au3) and some more functions in the next release.

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

GDIP_En.7z - Help file GDIP.chm

In the example _GDIPlus_PathBrushCreate proportions do not like.

Local $aPoints[11][2] = [[10], [303, 114], [215, 178], [248, 281], [160, 218], [72, 281], [105, 178], [17, 114], [126, 113], [160, 10], [194, 113]]

Star adjustable

#include <GDIP.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Local $hGUI, $hGraphics, $hBrush, $slider1, $slider2, $slider3, $slider4, $hSlider_Handle1, $hSlider_Handle2, $hSlider_Handle3, $hSlider_Handle4
Local $iRadius1 = 150, $iRadius2 = 58, $iCountAngle = 5, $iShift2 = 0

_Example()

Func _Example()
    ; Инициализирует библиотеку GDI+
    _GDIPlus_Startup()

    $hGUI = GUICreate("_Star", 500, 500)
    GUISetState()

    $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    _GDIPlus_GraphicsSetSmoothingMode($hGraphics, $SmoothingModeAntiAlias)

    ; Создает кисть, чтобы заполнить внутреннее пространство многоугольника
    $hBrush = _GDIPlus_BrushCreateSolid(0xFFFF6600)

    $aPoints = _Star($iRadius1, $iRadius2, $iCountAngle, 1, $iShift2)
    _GDIPlus_GraphicsFillRect($hGraphics, 80, 90, 370, 370)
    _GDIPlus_GraphicsFillPolygon2($hGraphics, $aPoints, $hBrush)

    $slider1 = GUICtrlCreateSlider(10, 5, 200, 30)
    GUICtrlSetLimit(-1, 165, 10)
    GUICtrlSetData(-1, 150)
    $hSlider_Handle1 = GUICtrlGetHandle(-1)

    $slider2 = GUICtrlCreateSlider(10, 35, 200, 30)
    GUICtrlSetLimit(-1, 165, 10)
    GUICtrlSetData(-1, 58)
    $hSlider_Handle2 = GUICtrlGetHandle(-1)

    $slider3 = GUICtrlCreateSlider(220, 5, 200, 30)
    GUICtrlSetLimit(-1, 33, 2)
    GUICtrlSetData(-1, 5)
    $hSlider_Handle3 = GUICtrlGetHandle(-1)

    $slider4 = GUICtrlCreateSlider(220, 35, 200, 30)
    GUICtrlSetLimit(-1, +70, -70)
    GUICtrlSetData(-1, 0)
    $hSlider_Handle4 = GUICtrlGetHandle(-1)

    GUIRegisterMsg($WM_HSCROLL, "WM_HSCROLL")

    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    ; Очищает ресурсы
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hGraphics)

    ; Закрывает библиотеку GDI+
    _GDIPlus_Shutdown()
EndFunc

; Func _Draw($hWnd, $Msg, $wParam, $lParam)
; EndFunc

Func WM_HSCROLL($hWnd, $Msg, $wParam, $lParam)
    #forceref $Msg, $wParam, $lParam
    Local $nScrollCode = BitAND($wParam, 0x0000FFFF) ; _WinAPI_LoWord
    Local $value = BitShift($wParam, 16) ; _WinAPI_HiWord
    
    Switch $lParam
        Case $hSlider_Handle1
            $iRadius1 = GUICtrlRead($slider1)
        Case $hSlider_Handle2
            $iRadius2 = GUICtrlRead($slider2)
        Case $hSlider_Handle3
            $iCountAngle = GUICtrlRead($slider3)
        Case $hSlider_Handle4
            $iShift2 = GUICtrlRead($slider4)
    EndSwitch

    ; Создает случайные точки
    Local $aPoints = _Star($iRadius1, $iRadius2, $iCountAngle, 1, $iShift2)
    ; Local $aPoints = _Star(58, 150, 8, 0)

    ; Рисует заполненный многоугольник
    ; If $nScrollCode <> 5 Then _GDIPlus_GraphicsFillPolygon2($hGraphics, $aPoints, $hBrush)
    ; If $nScrollCode <> 8 Then _GDIPlus_GraphicsFillPolygon2($hGraphics, $aPoints, $hBrush)
    _GDIPlus_GraphicsFillRect($hGraphics, 80, 90, 370, 370)
    _GDIPlus_GraphicsFillPolygon2($hGraphics, $aPoints, $hBrush)
    WinSetTitle($hGUI, '', 'R1=' & $iRadius1 & ', R2=' & $iRadius2 & ', C=' & $iCountAngle & ', S=' & $iShift2)

    Return $GUI_RUNDEFMSG
EndFunc


Func _Star($iRadius1, $iRadius2, $iCountAngle = 5, $iShift = 0, $iShift2 = 0, $iOffset = 270)
    If $iCountAngle < 2 Then Return SetError(1)
    Local $iAngle = 360 / $iCountAngle
    If $iShift = 1 Then
        $iShift = $iAngle / 2
    Else
        $iShift = 0
    EndIf
    Local $aPoints[$iCountAngle*2+1][2] = [[$iCountAngle*2]], $j = 1, $f = $iShift, $iRadian = 180 / 3.14159265358979
    ; MsgBox(0, 'Сообщение', $f)
    $iAngle2 = $iAngle / 2 - $iShift2
    For $i = 1 To $iCountAngle
        $aPoints[$j][1] = Round($iRadius1 * Cos($f /$iRadian)) + $iOffset
        $aPoints[$j][0] = Round($iRadius1 * Sin($f /$iRadian)) + $iOffset
        $aPoints[$j+1][1] =  Round($iRadius2 * Cos(($f + $iAngle2) / $iRadian)) + $iOffset
        $aPoints[$j+1][0] =  Round($iRadius2 * Sin(($f + $iAngle2) / $iRadian)) + $iOffset
        $f += $iAngle
        $j += 2
    Next
    Return $aPoints
EndFunc
Edited by AZJIO

Share this post


Link to post
Share on other sites

Star in motion.

#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7
#include <GDIP.au3>
#include <GUIConstantsEx.au3>
#include <Array.au3>

Example()

Func Example()
    AutoItSetOption("GUIOnEventMode", 1)

    _GDIPlus_Startup() ;initialize GDI+
    Local Const $iWidth = 600, $iHeight = 600, $iBgColor = 0x303030 ;$iBGColor format RRGGBB

    Global $hGUI = GUICreate("GDI+ example", $iWidth, $iHeight) ;create a test GUI
    GUISetBkColor($iBgColor, $hGUI) ;set GUI background color
    GUISetState(@SW_SHOW)

    ;create buffered graphics frame set for smoother gfx object movements
    Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI) ;create a graphics object from a window handle
    Global $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hGraphics)
    Global $hGfxCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsSetSmoothingMode($hGfxCtxt, 2) ;sets the graphics object rendering quality (antialiasing) $GDIP_SMOOTHINGMODE_HIGHQUALITY
    Global $hPen = _GDIPlus_PenCreate(0xFFFF8060, 2)
    _GDIPlus_GraphicsSetPixelOffsetMode($hGfxCtxt, 2) ; $GDIP_PIXELOFFSETMODE_HIGHQUALITY

    Global $hBrush = _GDIPlus_BrushCreateSolid(0xFFFF8060)
    Local $iRadius1, $iRadius2, $iCountAngle, $iShift2
    Local $aPoints

    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")

    Local $iTmpRadius1 = 150
    Local $iTmpRadius2 = 58
    Local $iTmpCountAngle = 5
    Local $iTmpShift2 = 5
    Local $iTmpShift = 20
    Local $iTmpSmooth = 0.2
    
    Local $iRadius1 = 165
    Local $iRadius2 = 50
    Local $iCountAngle = 10
    Local $iShift2 = 0
    Local $iShift = 40
    Local $iSmooth = 0
    
    Local $iDeRadius1 = 1
    Local $iDeRadius2 = 1
    Local $iDeCountAngle = 1
    Local $iDeShift2 = 1
    Local $iDeShift = 10
    Local $iDeSmooth = 0.1
    _GetStarPar($iRadius1, $iTmpRadius1, $iDeRadius1, 10, 165)
    _GetStarPar($iRadius2, $iTmpRadius2, $iDeRadius2, 10, 165)
    _GetStarPar($iCountAngle, $iTmpCountAngle, $iDeCountAngle, 3, 33)
    _GetStarPar($iShift2, $iTmpShift2, $iDeShift2, 0, 70)
    _GetStarPar($iShift, $iTmpShift, $iDeShift, 0, 60)
    $iDeShift *= 10
    _GetStarPar($iSmooth, $iTmpSmooth, $iDeSmooth, -2, 2, 0)
    $iDeSmooth /= 10

    Do
        $iRadius1 += $iDeRadius1
        $iRadius2 += $iDeRadius2
        $iCountAngle += $iDeCountAngle
        $iShift2 += $iDeShift2
        $iShift += $iDeShift
        $iSmooth += $iDeSmooth
        If $iRadius1 = $iTmpRadius1 Then _GetStarPar($iRadius1, $iTmpRadius1, $iDeRadius1, 10, 265)
        If $iRadius2 = $iTmpRadius2 Then _GetStarPar($iRadius2, $iTmpRadius2, $iDeRadius2, 10, 265)
        If $iCountAngle = $iTmpCountAngle Then _GetStarPar($iCountAngle, $iTmpCountAngle, $iDeCountAngle, 3, 33)
        If Abs($iShift2 - $iTmpShift2) < 2 Then _GetStarPar($iShift2, $iTmpShift2, $iDeShift2, -70, 70)
        ; If $iShift2 = $iTmpShift2 Then _GetStarPar($iShift2, $iTmpShift2, $iDeShift2, 70, 350, 1) ; Пересечений больше при большем сдвиге
        If Abs($iShift - $iTmpShift) < 22 Then
            _GetStarPar($iShift, $iTmpShift, $iDeShift, 0, 350)
            $iDeShift *= 10
        EndIf
        If Abs($iSmooth - $iTmpSmooth) < 0.1 Then
            _GetStarPar($iSmooth, $iTmpSmooth, $iDeSmooth, -2, 2, 0)
            $iDeSmooth /= 10
            ; MsgBox(0, '', $iSmooth & @LF & $iTmpSmooth & @LF & $iDeSmooth)
        EndIf
        WinSetTitle($hGUI, '', 'R1=' & $iRadius1 & '  R2=' & $iRadius2 & '  A=' & $iCountAngle & '  S2=' & $iShift2 & '  S=' & $iShift & '  Sm=' & $iSmooth)

        $aPoints = _Star($iRadius1, $iRadius2, $iCountAngle, $iShift, $iShift2)
        _GDIPlus_GraphicsClear($hGfxCtxt, 0xFF000000 + $iBgColor) ;clear bitmap for repaint
        _GDIPlus_GraphicsDrawClosedCurve2($hGfxCtxt, $aPoints, $iSmooth, $hPen) ;draw closed curve
        ; _GDIPlus_GraphicsFillClosedCurve2($hGfxCtxt, $aPoints, $iSmooth, $hBrush) ; Fill
        _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0) ;copy bitmap to graphic handle (GUI)
    Until Not Sleep(50) ;sleep 30 ms to avoid high cpu usage
EndFunc   ;==>Example

Func _GetStarPar(ByRef $iR, ByRef $iTmpR, ByRef $iDeR, $L1, $L2, $int = 1)
    Do
        $iTmpR = Random($L1, $L2, $int)
    Until $iTmpR <> $iR ; Повторять покуда не будет различие
    If $iTmpR < $iR Then
        $iDeR = -1
    Else
        $iDeR = 1
    EndIf
EndFunc   ;==>_GetStarPar

Func _Exit()
    ;cleanup GDI+ resources
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_PenDispose($hPen)
    _GDIPlus_GraphicsDispose($hGfxCtxt)
    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_Shutdown()
    GUIDelete($hGUI)
    Exit
EndFunc   ;==>_Exit

Func _Star($iRadius1, $iRadius2, $iCountAngle = 5, $iShift = 0, $iShift2 = 0, $iOffset = 300)
    If $iCountAngle < 2 Then Return SetError(1)
    Local $iAngle = 360 / $iCountAngle
    Local $aPoints[$iCountAngle * 2 + 1][2] = [[$iCountAngle * 2]], $j = 1, $f = $iShift, $iRadian = 180 / 3.14159265358979
    ; MsgBox(0, 'Сообщение', $f)
    $iAngle2 = $iAngle / 2 - $iShift2
    For $i = 1 To $iCountAngle
        $aPoints[$j][1] = Round($iRadius1 * Cos($f / $iRadian)) + $iOffset
        $aPoints[$j][0] = Round($iRadius1 * Sin($f / $iRadian)) + $iOffset
        $aPoints[$j + 1][1] = Round($iRadius2 * Cos(($f + $iAngle2) / $iRadian)) + $iOffset
        $aPoints[$j + 1][0] = Round($iRadius2 * Sin(($f + $iAngle2) / $iRadian)) + $iOffset
        $f += $iAngle
        $j += 2
    Next
    Return $aPoints
EndFunc   ;==>_Star
Edited by AZJIO

Share this post


Link to post
Share on other sites

AZJIO,

a lot of GDI+ functions from GDIP.au3 have been integrated into the latest beta version - just have a look. ;)

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

UEZ

I used the example of 3.3.9.25 (_GDIPlus_GraphicsDrawClosedCurve2). I made a calculation of the star.

282 unique functions are absent in 3.3.9.25. Perhaps they have other names.

Edited by AZJIO

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...