Page 1 of 1

Is SkewCoordinates() bugged ?

Posted: Sat Apr 13, 2024 9:16 am
by Mesa
With this code found in the pb help, the "skewed" text is translated on the right, is that a bug ?.

Code: Select all

If OpenWindow(0, 0, 0, 400, 200, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    CanvasGadget(0, 0, 0, 400, 200)    
    
    If StartVectorDrawing(CanvasVectorOutput(0))
      VectorFont(LoadFont(0, "Times New Roman", 60, #PB_Font_Bold))

      VectorSourceColor(RGBA(0, 0, 255, 128))
      MovePathCursor(50, 50)
      DrawVectorText("Test")
    
      SkewCoordinates(45, 0)
    
      VectorSourceColor(RGBA(255, 0, 0, 128))
      MovePathCursor(50, 50)
      DrawVectorText("Test")    
    
      StopVectorDrawing()
    EndIf
    
    Repeat
      Event = WaitWindowEvent()
    Until Event = #PB_Event_CloseWindow
  EndIf

Re: Is SkewCoordinates() bugged ?

Posted: Sat Apr 13, 2024 10:33 am
by mk-soft
No,
Is written on the left. I have added an auxiliary line.

Code: Select all

If OpenWindow(0, 0, 0, 400, 200, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  CanvasGadget(0, 0, 0, 400, 200)    
  
  If StartVectorDrawing(CanvasVectorOutput(0))
    
    SkewCoordinates(45, 0)
    MovePathCursor(0, 0)
    AddPathLine(0,160)
    VectorSourceColor(RGBA(0, 0, 0, 128))
    StrokePath(2)
    
    ResetCoordinates()
    
    VectorFont(LoadFont(0, "Times New Roman", 60, #PB_Font_Bold))
    
    VectorSourceColor(RGBA(0, 0, 255, 128))
    MovePathCursor(5, 50)
    DrawVectorText("Test")
    
    SkewCoordinates(45, 0)
    
    VectorSourceColor(RGBA(255, 0, 0, 128))
    MovePathCursor(5, 50)
    DrawVectorText("Test")    
    
    
    StopVectorDrawing()
  EndIf
  
  Repeat
    Event = WaitWindowEvent()
  Until Event = #PB_Event_CloseWindow
EndIf