die x,y-Koordinaten sind die gleiche, mit denen die Linien gezeichnet werden. Ich verwende ja das selbe Array (die Koordinaten liegen in einem Array).
Das kann es also nicht sein ...
Hast du meinen Beitrag überhaupt gelesen?
... außerdem - ich oberen Teil (schräger Graph) passt es doch ! ... und anschließend nicht mehr ???? hhmmmm ..
Sollte auch nicht überraschen, es sieht so aus als ob es passt, aber es passt nicht. Die Linie davor verläuft im selben Winkel, deshalb scheint es so aus als ob die Ellipse auf der Koordinate liegt, tut sie aber nicht.
C
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 615, 437, 192, 124)
GUISetState(@SW_SHOW)
#include <GDIPlus.au3>
_GDIPlus_Startup()
$hGraphics = _GDIPlus_GraphicsCreateFromHWND($Form1)
Local $aRandomDots[30][2]
For $i = 0 To UBound($aRandomDots) - 1
$aRandomDots[$i][0] = $i * (615 / UBound($aRandomDots))
$aRandomDots[$i][1] = Random(0, 437, 1)
Next
For $i = 0 To UBound($aRandomDots) - 2
_GDIPlus_GraphicsDrawLine($hGraphics, _
$aRandomDots[$i][0], _
$aRandomDots[$i][1], _
$aRandomDots[$i + 1][0], _
$aRandomDots[$i + 1][1] _
)
_GDIPlus_GraphicsDrawEllipse($hGraphics, $aRandomDots[$i][0], $aRandomDots[$i][1], 10, 10)
Next
MsgBox(0, 0, "Falsche Darstellung")
_GDIPlus_GraphicsClear($hGraphics, 0xFFFFFFFF)
For $i = 0 To UBound($aRandomDots) - 2
_GDIPlus_GraphicsDrawLine($hGraphics, _
$aRandomDots[$i][0], _
$aRandomDots[$i][1], _
$aRandomDots[$i + 1][0], _
$aRandomDots[$i + 1][1] _
)
_GDIPlus_GraphicsDrawEllipse($hGraphics, $aRandomDots[$i][0] - 10/2, $aRandomDots[$i][1] - 10/2, 10, 10)
Next
MsgBox(0, 0, "Korrekte Darstellung")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Alles anzeigen