Funktionen Grafisch darstellen

    • Offizieller Beitrag

    Hallo

    Also.. ich wollte mit huggy ein programm schreiben (ich schreibe, er unterhält mich^^) was Lineare funktionen usw grafisch darstellen kann.. Nur stehe ich momentan aufm schlauch (fehlt mir wohl das mathematische denken^^)

    So, wie mach ich das aber jetzt?^^ also die rechnung war kein problem ( f(x)=x+5 usw..) einfach mit Execute und stringreplace, aber wie stell ich dies grafisch dar? also die differenzen in einer kurve? hatte ne for schleife drin, die funktionierte aber irgendwie nicht -.- die funktion _IntToPixel stimmt überhaupt noch nicht (wegen plus und minus feldern usw) aber wie krieg ich zummindest ne kurve hin?

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    GUICreate("", 500, 500)
    $gra = GUICtrlCreateGraphic(10, 10, 480, 480)
    GUICtrlSetBkColor(-1, 0xffffff)
    GUICtrlSetGraphic($gra, $GUI_GR_PENSIZE, 2)
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, 480 / 2, 470)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, 480 / 2, 10)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, 470, 480 / 2)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, 10, 480 / 2)
    GUICtrlSetGraphic($gra, $GUI_GR_PENSIZE, 1)
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0)
    _CreateGraphicSteps(10, 10, 10, 460, 460)
    GUISetState()
    _func("x+1", 5, 6)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _func($Fx, $x1, $x2)
    Local $func1, $func2
    $func1 = Execute(StringReplace($Fx, "x", $x1))
    $func2 = Execute(StringReplace($Fx, "x", $x2))

    GUICtrlSetGraphic($gra,$GUI_GR_REFRESH)
    MsgBox(0, "", "F(x1)=" & $func1 & @LF & "F(x2)=" & $func2)
    EndFunc ;==>_func

    [/autoit] [autoit][/autoit] [autoit]

    Func _CreateGraphicSteps($iPixels, $iX, $iY, $iWidth, $iHeigth)
    For $x = $iX To $iWidth + $iPixels Step $iPixels
    ;~ ConsoleWrite($x & @CRLF)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $x, ($iWidth / 2) + 5)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, $x, ($iWidth / 2) + 15)
    Next
    For $y = $iY To $iHeigth+$iPixels Step $iPixels
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, ($iHeigth / 2) + 5,$y)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, ($iHeigth / 2) + 15,$y )
    Next
    EndFunc ;==>_CreateGraphicSteps

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _IntToPix($iInt,$iInt2,$iPixels)
    ;Das stimmt 100%ig noch nich aber ich wills zuminddest so zum laufen bringen das es eine kurve darstellt
    GUICtrlSetGraphic($gra,$GUI_GR_DOT,$iInt * $iPixels,$iInt * $iPixels)
    EndFunc

    [/autoit]

    Wäre super wenn mir jemmand helfen könnte :)

    Mfg Spider

    • Offizieller Beitrag

    Daran hab ich mich auch schon mal versucht. Ich hab dann aber aufgehört,weil schon "GUICtrlSetGraphic($gra, $GUI_GR_LINE, $x, $y)" völlig unerwartet arbeitet. (Line beginnt immer bei 0,0 des Grafikbereiches mit Länge $x bis $y als senkrechter Parameter.

    • Offizieller Beitrag

    Hallo Nochmal

    So, meine vorerst beta version: Leider noch ohne kurve, dafür aber mit strichen^^ Probiert sie bitte mal und sagt mir bitte ob sie funktioniert und was ihr davon haltet..

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $WidthGra = 580
    Global $HeightGra = 580

    [/autoit] [autoit][/autoit] [autoit]

    Global $maingui, $gra

    [/autoit] [autoit][/autoit] [autoit]

    $maingui = GUICreate("Funktionen Grafisch darstellen - By GtaSpider", $WidthGra + 20, $HeightGra + 40)
    $ans = GUICtrlCreateMenu("Ansicht")
    $grid = GUICtrlCreateMenuitem("Gitternetz", $ans)

    [/autoit] [autoit][/autoit] [autoit]

    $gra = GUICtrlCreateGraphic(10, 10, $WidthGra, $HeightGra)
    GUICtrlSetBkColor(-1, 0xffffff)
    GUICtrlSetGraphic($gra, $GUI_GR_PENSIZE, 2)
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $WidthGra / 2, $WidthGra - 10)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, $WidthGra / 2, 10)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $HeightGra - 10, $HeightGra / 2)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, 10, $HeightGra / 2)
    GUICtrlSetGraphic($gra, $GUI_GR_PENSIZE, 1)
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0)
    _CreateGraphicSteps(10, 10, 10, $WidthGra - 20, $HeightGra - 20)
    GUISetState()
    _func("(x+1)²", 1, 2)
    _func("(x+1)²", 2, 3)
    _func("(x+1)²", 3, 4)

    [/autoit] [autoit][/autoit] [autoit]

    Sleep(500)

    [/autoit] [autoit][/autoit] [autoit]

    If MsgBox(4, "", "Ändere Breite&Höhe?") = 6 Then
    _ChangeGraPos(800, 800, 1)

    [/autoit] [autoit][/autoit] [autoit]

    _func("(x+1)²", 1, 2)
    _func("(x+1)²", 2, 3)
    _func("(x+1)²", 3, 4)
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $grid
    _CreateGrid(10, 10, 10, $WidthGra - 20, $HeightGra - 20)
    GUICtrlSetGraphic($gra, $GUI_GR_REFRESH)
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _ChangeGraPos($iWidth, $iHeigth, $guiChange = 0)
    Global $WidthGra = $iWidth
    Global $HeightGra = $iHeigth
    GUICtrlDelete($gra)

    [/autoit] [autoit][/autoit] [autoit]

    $gra = GUICtrlCreateGraphic(10, 10, $WidthGra, $HeightGra)
    GUICtrlSetBkColor(-1, 0xffffff)
    GUICtrlSetGraphic($gra, $GUI_GR_PENSIZE, 2)
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $WidthGra / 2, $WidthGra - 10)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, $WidthGra / 2, 10)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $HeightGra - 10, $HeightGra / 2)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, 10, $HeightGra / 2)
    GUICtrlSetGraphic($gra, $GUI_GR_PENSIZE, 1)
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0)
    _CreateGraphicSteps(10, 10, 10, $WidthGra - 20, $HeightGra - 20)
    GUICtrlSetGraphic($gra, $GUI_GR_REFRESH)
    ;~ WinMove
    If $guiChange Then WinMove($maingui, "", Default, Default, $WidthGra + 26, $HeightGra + 67)
    EndFunc ;==>_ChangeGraPos

    [/autoit] [autoit][/autoit] [autoit]

    Func _func($Fx, $x1, $x2)
    Local $func1, $func2, $ss, $sBuff
    $ss = StringSplit($Fx, "x")
    For $i = 1 To $ss[0]
    If StringIsAlNum(StringRight($ss[$i], 1)) And $i <> $ss[0] Then
    ConsoleWrite($ss[$i] & "*" & $x1 & @CRLF)
    $sBuff &= $ss[$i] & "*" & $x1
    Else
    $sBuff &= $ss[$i]
    If $i <> $ss[0] Then $sBuff &= $x1
    EndIf
    Next
    $func1 = StringReplace(StringReplace($sBuff, "²", "^2"), "³", "^3")
    $sBuff = ""
    $ss = StringSplit($Fx, "x")
    For $i = 1 To $ss[0]
    If StringIsAlNum(StringRight($ss[$i], 1)) And $i <> $ss[0] Then
    ConsoleWrite($ss[$i] & "*" & $x2 & @CRLF)
    $sBuff &= $ss[$i] & "*" & $x2
    Else
    $sBuff &= $ss[$i]
    If $i <> $ss[0] Then $sBuff &= $x2
    EndIf
    Next
    $func2 = StringReplace(StringReplace($sBuff, "²", "^2"), "³", "^3")


    $PixFunc1 = _IntToPix(Execute($func1), $x1, 10)
    $PixFunc2 = _IntToPix(Execute($func2), $x2, 10)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $PixFunc1[0], $PixFunc1[1])
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, $PixFunc2[0], $PixFunc2[1])

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetGraphic($gra, $GUI_GR_REFRESH)
    ;~ MsgBox(0, "", "F(x1)=" & $func1 &"="&Execute($func1)& @LF & "F(x2)=" & $func2&"="&Execute($func2))
    EndFunc ;==>_func

    [/autoit] [autoit][/autoit] [autoit]

    Func _CreateGrid($iPixels, $iX, $iY, $iWidth, $iHeigth)
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0xaaaaaa)
    For $x = $iX To $iWidth + $iPixels Step $iPixels
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $x, $iPixels)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, $x, $iWidth + $iPixels)
    Next
    For $y = $iY To $iHeigth + $iPixels Step $iPixels
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $iPixels, $y)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, $iWidth + $iPixels, $y)
    Next
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0)
    EndFunc ;==>_CreateGrid

    [/autoit] [autoit][/autoit] [autoit]

    Func _CreateGraphicSteps($iPixels, $iX, $iY, $iWidth, $iHeigth)
    For $x = $iX To $iWidth + $iPixels Step $iPixels
    ;~ ConsoleWrite($x & @CRLF)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $x, ($iWidth / 2) + 5)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, $x, ($iWidth / 2) + 15)
    Next
    For $y = $iY To $iHeigth + $iPixels Step $iPixels
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, ($iHeigth / 2) + 5, $y)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, ($iHeigth / 2) + 15, $y)
    Next
    EndFunc ;==>_CreateGraphicSteps

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _IntToPix($iX, $iY, $iPixels)
    Local $aRet[2]
    $aRet[0] = ($WidthGra / 2) + ($iX * $iPixels)
    $aRet[1] = ($HeightGra / 2) - ($iY * $iPixels)
    GUICtrlSetGraphic($gra, $GUI_GR_DOT, $aRet[0], $aRet[1])
    Return $aRet
    EndFunc ;==>_IntToPix

    [/autoit]

    Mfg Spider

  • Zitat

    Original von th.meger
    Hi,

    sieht nicht schlecht aus. Aber ich glaube, bis du da soweit bist wie andere kostenlose Programme ... puh!

    Aber ich will die nicht entmutigen!

    So long,

    Mega

    was für welche kennst du denn so? =D

    • Offizieller Beitrag

    Hallo!

    hier (2 sekunden googln)... http://www.pcfreunde.de/download/detai…h-analysis.html

    Edit: So... Also, hab nun das Skript ganz passabel erstellt (ist noch nicht besodners benutzerfreundlich das kommt aber später^^) Also Jetzt will ich halt Kurven darstellen.. Da muss ich doch eigentlich nur eine For schleife machen von $x nach $y und das halt mit Step 1 bzw -1 hab es mal gemacht (und verscheiden variiert) aber immer das selbe ergebnis: also eigentlich nich das selbe ergebnis aber aufjedenfall nicht so wie ich es will^^ Kann mir Nochmal jemmand helfen? _InitalizeFunc() Ist die funtkion wo er das eigentlich machen sollte

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    #include <array.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $WidthGra = 480
    Global $HeightGra = 480
    Global $Funktions[3][3]
    $Funktions[0][0] = "(x+1)²"
    $Funktions[0][1] = 1
    $Funktions[0][2] = 2
    $Funktions[1][0] = "(x+1)²"
    $Funktions[1][1] = 2
    $Funktions[1][2] = 3
    $Funktions[2][0] = "(x+1)²"
    $Funktions[2][1] = 3
    $Funktions[2][2] = 4

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $maingui, $gra, $tip = "Koordinaten:"

    [/autoit] [autoit][/autoit] [autoit]

    $maingui = GUICreate("Funktionen Grafisch darstellen - By GtaSpider", $WidthGra + 20, $HeightGra + 40)
    $ans = GUICtrlCreateMenu("Ansicht")
    $grid = GUICtrlCreateMenuItem("Gitternetz", $ans)

    [/autoit] [autoit][/autoit] [autoit]

    $gra = GUICtrlCreateGraphic(10, 10, $WidthGra, $HeightGra)
    GUICtrlSetBkColor(-1, 0xffffff)
    GUICtrlSetGraphic($gra, $GUI_GR_PENSIZE, 2)
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $WidthGra / 2, $WidthGra - 10)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, $WidthGra / 2, 10)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $HeightGra - 10, $HeightGra / 2)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, 10, $HeightGra / 2)
    GUICtrlSetGraphic($gra, $GUI_GR_PENSIZE, 1)
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0)
    _CreateGraphicSteps(10, 10, 10, $WidthGra - 20, $HeightGra - 20)
    GUISetState()

    [/autoit] [autoit][/autoit] [autoit]

    _InitalizeFunc()

    [/autoit] [autoit][/autoit] [autoit]

    Sleep(500)

    [/autoit] [autoit][/autoit] [autoit]

    If MsgBox(4, "", "Ändere Breite&Höhe?") = 6 Then
    _ChangeGraPos(800, 800, 1)
    _InitalizeFunc()
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $grid
    If BitAND(GUICtrlRead($grid), $GUI_CHECKED) <> $GUI_CHECKED Then
    _ChangeGraPos($WidthGra, $HeightGra, 1)
    _CreateGrid(10, 10, 10, $WidthGra - 20, $HeightGra - 20)
    _InitalizeFunc()
    GUICtrlSetGraphic($gra, $GUI_GR_REFRESH)
    GUICtrlSetState($grid, $GUI_CHECKED)
    Else
    _ChangeGraPos($WidthGra, $HeightGra, 1)
    _InitalizeFunc()
    GUICtrlSetGraphic($gra, $GUI_GR_REFRESH)
    GUICtrlSetState($grid, $GUI_UNCHECKED)
    EndIf

    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _ChangeGraPos($iWidth, $iHeigth, $guiChange = 0)
    Global $WidthGra = $iWidth
    Global $HeightGra = $iHeigth
    GUICtrlDelete($gra)

    [/autoit] [autoit][/autoit] [autoit]

    $gra = GUICtrlCreateGraphic(10, 10, $WidthGra, $HeightGra)
    GUICtrlSetTip(-1, $tip)
    GUICtrlSetBkColor(-1, 0xffffff)
    GUICtrlSetGraphic($gra, $GUI_GR_PENSIZE, 2)
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $WidthGra / 2, $WidthGra - 10)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, $WidthGra / 2, 10)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $HeightGra - 10, $HeightGra / 2)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, 10, $HeightGra / 2)
    GUICtrlSetGraphic($gra, $GUI_GR_PENSIZE, 1)
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0)
    _CreateGraphicSteps(10, 10, 10, $WidthGra - 20, $HeightGra - 20)
    GUICtrlSetGraphic($gra, $GUI_GR_REFRESH)
    ;~ WinMove
    If $guiChange Then WinMove($maingui, "", Default, Default, $WidthGra + 26, $HeightGra + 67)
    EndFunc ;==>_ChangeGraPos

    [/autoit] [autoit][/autoit] [autoit]

    Func _InitalizeFunc()
    Local $aFunc, $iStep = 1
    For $i = 0 To UBound($Funktions, 1) - 1
    $aFunc = _func($Funktions[$i][0], $Funktions[$i][1], $Funktions[$i][2]); ,0
    If $aFunc[0] > $aFunc[1] Then $iStep = -1
    #cs
    For $b = $aFunc[0] To $aFunc[1] Step $iStep
    ConsoleWrite($b & @CRLF)
    $PixFunc1 = _IntToPix($aFunc[0], $Funktions[$i][1], 10)
    $PixFunc2 = _IntToPix($aFunc[1],$b, 10)
    GUICtrlSetGraphic($gra, $GUI_GR_PENSIZE, 2)
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0x0000ff)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $PixFunc1[0], $PixFunc1[1])
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, $PixFunc2[0], $PixFunc2[1])
    GUICtrlSetGraphic($gra, $GUI_GR_PENSIZE, 1)
    $tip &= @CRLF&$aFunc[0]&"x"&$aFunc[1]
    GUICtrlSetTip($gra,$tip)
    GUICtrlSetGraphic($gra, $GUI_GR_REFRESH)
    Next
    #ce

    Next
    EndFunc ;==>_InitalizeFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _func($Fx, $x1, $x2, $iDraw = 1)
    Local $func1, $func2, $ss, $sBuff, $aRet[2]
    $ss = StringSplit($Fx, "x")
    For $i = 1 To $ss[0]
    If StringIsAlNum(StringRight($ss[$i], 1)) And $i <> $ss[0] Then
    ConsoleWrite($ss[$i] & "*" & $x1 & @CRLF)
    $sBuff &= $ss[$i] & "*" & $x1
    Else
    $sBuff &= $ss[$i]
    If $i <> $ss[0] Then $sBuff &= $x1
    EndIf
    Next
    $func1 = StringReplace(StringReplace($sBuff, "²", "^2"), "³", "^3")
    $sBuff = ""
    $ss = StringSplit($Fx, "x")
    For $i = 1 To $ss[0]
    If StringIsAlNum(StringRight($ss[$i], 1)) And $i <> $ss[0] Then
    ConsoleWrite($ss[$i] & "*" & $x2 & @CRLF)
    $sBuff &= $ss[$i] & "*" & $x2
    Else
    $sBuff &= $ss[$i]
    If $i <> $ss[0] Then $sBuff &= $x2
    EndIf
    Next
    $func2 = StringReplace(StringReplace($sBuff, "²", "^2"), "³", "^3")
    $aRet[0] = Execute($func1)
    $aRet[1] = Execute($func2)
    If $iDraw = 1 Then
    $PixFunc1 = _IntToPix(Execute($func1), $x1, 10)
    $PixFunc2 = _IntToPix(Execute($func2), $x2, 10)
    GUICtrlSetGraphic($gra, $GUI_GR_PENSIZE, 2)
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0xff0000)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $PixFunc1[0], $PixFunc1[1])
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, $PixFunc2[0], $PixFunc2[1])
    GUICtrlSetGraphic($gra, $GUI_GR_PENSIZE, 1)
    $tip &= @CRLF & Execute($func1) & "x" & Execute($func2)
    GUICtrlSetTip($gra, $tip)
    GUICtrlSetGraphic($gra, $GUI_GR_REFRESH)
    EndIf

    Return $aRet
    ;~ MsgBox(0, "", "F(x1)=" & $func1 &"="&Execute($func1)& @LF & "F(x2)=" & $func2&"="&Execute($func2))
    EndFunc ;==>_func

    [/autoit] [autoit][/autoit] [autoit]

    Func _CreateGrid($iPixels, $iX, $iY, $iWidth, $iHeigth)
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0xcccccc)
    For $x = $iX To $iWidth + $iPixels Step $iPixels
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $x, $iPixels)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, $x, $iWidth + $iPixels)
    Next
    For $y = $iY To $iHeigth + $iPixels Step $iPixels
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $iPixels, $y)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, $iWidth + $iPixels, $y)
    Next
    GUICtrlSetGraphic($gra, $GUI_GR_COLOR, 0)
    EndFunc ;==>_CreateGrid

    [/autoit] [autoit][/autoit] [autoit]

    Func _CreateGraphicSteps($iPixels, $iX, $iY, $iWidth, $iHeigth)
    For $x = $iX To $iWidth + $iPixels Step $iPixels
    ;~ ConsoleWrite($x & @CRLF)
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, $x, ($iWidth / 2) + 5)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, $x, ($iWidth / 2) + 15)
    ;~ GUICtrlCreateLabel(Round(($x/$iPixels)-($iWidth/$iPixels/2)),$x+5,($iWidth/2)+5,$iPixels)
    ;~ GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
    Next
    For $y = $iY To $iHeigth + $iPixels Step $iPixels
    GUICtrlSetGraphic($gra, $GUI_GR_MOVE, ($iHeigth / 2) + 5, $y)
    GUICtrlSetGraphic($gra, $GUI_GR_LINE, ($iHeigth / 2) + 15, $y)
    Next
    EndFunc ;==>_CreateGraphicSteps

    [/autoit] [autoit][/autoit] [autoit]

    Func _IntToPix($iX, $iY, $iPixels)
    Local $aRet[2]
    $aRet[0] = ($WidthGra / 2) + ($iX * $iPixels)
    $aRet[1] = ($HeightGra / 2) - ($iY * $iPixels)
    GUICtrlSetGraphic($gra, $GUI_GR_DOT, $aRet[0], $aRet[1])
    Return $aRet
    EndFunc ;==>_IntToPix

    [/autoit]

    Edit2: So ist es natürlich quatsch^^ aber geht das überhaupt?

    mfg spider

  • Details zu PMath Analysis
    Sprache: Deutsch Plattform: 9x ME NT 2000 XP
    Datum: 14.03.2006 Lizenz: Shareware
    Dateigröße: 1,40 MB Kosten: 30,00 Euro *
    Downloads: 478...


    PS: wir waren doch zu TMN verabredet :(