Linie dicker machen
Übersicht
BlitzBasic
Beginners-Corner|
|
Kleiner satanBetreff: Linie dicker machen |
Antworten mit Zitat |
|---|---|---|
|
hallo,
kann mir jemdand sagen wie ich eine linie ( Line ) größer mache? also so das die linie breiter als ein pixel ist? danke |
||
|
|
BlitzChecker |
Antworten mit Zitat |
|---|---|---|
| mehrere nebeneinander zeichnen | ||
|
|
TheProgrammer |
Antworten mit Zitat |
|---|---|---|
|
Hatte gerade langeweile und hab dir mal ne Funktion geschrieben: ^^
Code: [AUSKLAPPEN] Graphics 640,480,0,2 SetBuffer BackBuffer() While Not KeyHit(1) Cls line2(100,100,MouseX(),MouseY(),10) Flip Wend End Function line2(x1%,y1%,x2%,y2%,width%=1) angle = ATan2(x2-x1,y2-y1) For I = 1 To width dx = Cos(-angle)*(I-(width/2)) dy = Sin(-angle)*(I-(width/2)) Line x1+dx,y1+dy,x2+dx,y2+dy Next End Function |
||
| aktuelles Projekt: The last day of human being | ||
|
|
Jan_Ehemaliger Admin |
Antworten mit Zitat |
|---|---|---|
|
THUMBS UP Bitte beachte, das der Line Befehl nicht der schnellste ist. |
||
| between angels and insects | ||
|
|
TheProgrammer |
Antworten mit Zitat |
|---|---|---|
|
Bitte beachte, dass ich diese Funktion mit Alkohol im Blut geschrieben habe |
||
| aktuelles Projekt: The last day of human being | ||
|
|
SpionAtom |
Antworten mit Zitat |
|---|---|---|
|
Und wenn ihr noch was langsameres wollt (allerdings ohne "Lücken" in der Linie), dann zieht euch das rein:
Code: [AUSKLAPPEN] Graphics 800, 600, 16, 2 SetBuffer BackBuffer() spx = 50: spy = 150 ;Startpunkt epx = 700: epy = 500 ;Endpunkt d = 5 ;Dicke Repeat ;Eingaben If MouseDown(1) Then spx = MouseX():spy = MouseY() If MouseDown(2) Then epx = MouseX():epy = MouseY() Cls ;Hilfetext Color 0,150,0:Oval spx-10,spy-10,20,20,1 Color 0,0,150:Oval epx-10,epy-10,20,20,1 Color 255, 255, 255 Text spx-30, spy-25,"Startpunkt" Text epx-30, epy-25,"Endpunkt" Text 0,0,"Startpunkt setzen = Linksklick" Text 0,20, "Endpunkt setzen = Rechtsklick" BigLine spx, spy, epx, epy, d Flip() Until KeyDown(1) End Function BigLine(spx, spy, epx, epy, d) abstand# = Sqr((spx-epx)^2 + (spy-epy)^2) xdif# = epx-spx ydif# = epy-spy Color 255,0,0 i = 0 Repeat ;Plot spx + i*(xdif#/abstand), spy + i*(ydif#/abstand) Oval spx + i*(xdif#/abstand)-d/2, spy + i*(ydif#/abstand)-d/2,d,d i = i + 1 Until i >= abstand End Function |
||
| os: Windows 10 Home cpu: Intel Core i7 6700K 4.00Ghz gpu: NVIDIA GeForce GTX 1080 | ||
|
|
Kleiner satan |
Antworten mit Zitat |
|---|---|---|
|
ich kann auch n delay 1000 da reinschiben |
||
Übersicht
BlitzBasic
Beginners-Corner
Powered by phpBB © 2001 - 2006, phpBB Group
