Search found 3 matches

by osg
Sun Jun 08, 2025 8:46 pm
Forum: Coding Questions
Topic: [PB 6.20] StrokePath() cannot draw a 1px width line?
Replies: 6
Views: 515

Re: [PB 6.20] StrokePath() cannot draw a 1px width line?

Jesus... I didn't know that something could start between the pixels, thank you guys.
by osg
Sun Jun 08, 2025 7:44 pm
Forum: Coding Questions
Topic: [PB 6.20] StrokePath() cannot draw a 1px width line?
Replies: 6
Views: 515

Re: [PB 6.20] StrokePath() cannot draw a 1px width line?


The coordinate 0,10 is exactly between two pixels, on the edge.
You have to draw at at 0.5, 10.5 in the middle of a pixel.


Thank you. MovePathCursor(0.5,10.5) (or MovePathCursor(0,10.5)) helps a little, but it makes the line longer and blurry at the ends. This is all wrong, I think (0, 10) must ...
by osg
Sun Jun 08, 2025 5:36 pm
Forum: Coding Questions
Topic: [PB 6.20] StrokePath() cannot draw a 1px width line?
Replies: 6
Views: 515

[PB 6.20] StrokePath() cannot draw a 1px width line?

Subj
If OpenWindow(0, 0, 0, 400, 200, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 0, 400, 200)
SetGadgetColor(0, #PB_Gadget_BackColor, #Black)

If StartVectorDrawing(CanvasVectorOutput(0))

MovePathCursor(0,10)
AddPathLine(68, 0, #PB_Path_Relative ...