Is SkewCoordinates() bugged ?

Just starting out? Need help? Post your questions and find answers here.
Mesa
Enthusiast
Enthusiast
Posts: 447
Joined: Fri Feb 24, 2012 10:19 am

Is SkewCoordinates() bugged ?

Post 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
User avatar
mk-soft
Always Here
Always Here
Posts: 6320
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Is SkewCoordinates() bugged ?

Post 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
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply