more failing vector graphics
Posted: Tue Dec 07, 2021 1:52 am
Demonstration on how ABSOLUTE move in pathsegments fails
As result existing complex SVG graphics will show completely wrong
Above code works fine in PureBasic
As result existing complex SVG graphics will show completely wrong
Code: Select all
Enumeration
#FONT_BOLD
#FONT_NORMAL
#WINDOW
#CANVAS
EndEnumeration
LoadFont(#FONT_BOLD, "Consolas", 10,#PB_Font_Bold)
LoadFont(#FONT_NORMAL, "Consolas", 10)
;RotateCoordinates(2521,189,90)
;ScaleCoordinates(0.33,0.33)
;2980/2107
OpenWindow(#WINDOW,0,0,1003,712,"TEST",#PB_Window_BorderLess)
CanvasGadget(#CANVAS,5,5,993,702,#PB_Canvas_Border)
StartVectorDrawing(CanvasVectorOutput(#CANVAS))
AddPathSegments("M 40 20 L 120 20 L 120 60 L 200 60 L 200 100 L 280 100 L 280 140 L 360 140 L 360 180")
VectorSourceColor(RGBA(255, 0, 0, 255))
StrokePath(25, #PB_Path_RoundCorner)
AddPathSegments("M 40 20 l 80 0 l 0 40 l 80 0 l 0 40 l 80 0 l 0 40 l 80 0 l 0 40")
VectorSourceColor(RGBA(0,255, 0, 255))
StrokePath(15, #PB_Path_RoundCorner)
AddPathSegments("M 360 180 m -80 -40 l 80 0 l 0 40 M 280 100 l 0 40 l 80 0 M 200 60 l 0 40 l 80 0 M 120 20 l 0 40 l 80 0 M 40 20 l 80 0")
VectorSourceColor(RGBA(0, 0, 255, 255))
StrokePath(5, #PB_Path_RoundCorner)
StopVectorDrawing()