It is currently Wed Sep 30, 2020 9:38 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: [Done] DrawVectorText() and the font
PostPosted: Fri Aug 07, 2020 11:07 am 
Offline
Addict
Addict

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 4934
Location: Germany
Hi,

maybe it's a documentation bug, but I would say it's a PB bug.

It is not possible to use DrawVectorText() without setting a font before.
Code:
If OpenWindow(0, 0, 0, 400, 200, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  CanvasGadget(0, 0, 0, 400, 200)
  LoadFont(0, "Impact", 20, #PB_Font_Bold)
 
  If StartVectorDrawing(CanvasVectorOutput(0))
   
    ;VectorFont(FontID(0), 25)
    VectorSourceColor(RGBA(0, 0, 0, 80))
    Text$ = "The quick brown fox jumped over the lazy doc"
   
    For i = 1 To 6
      MovePathCursor(200 - VectorTextWidth(Text$)/2, 100 - VectorTextHeight(Text$)/2)
      DrawVectorText(Text$)
      RotateCoordinates(200, 100, 30)
    Next i
   
    StopVectorDrawing()
  EndIf
 
  Repeat
    Event = WaitWindowEvent()
  Until Event = #PB_Event_CloseWindow
EndIf


In the german DrawVectorText() help it is written:
Quote:
Der zu verwendende Zeichensatz kann mittels VectorFont() festgelegt werden.

"kann" means could, but not 'have to'

In my opinion the default font should be used if no VectorFont() is set, like for all other Gadgets.

If I'm wrong, move it to the Documentation bug section.


Top
 Profile  
Reply with quote  
 Post subject: Re: DrawVectorText() and the font
PostPosted: Fri Aug 07, 2020 7:12 pm 
Offline
Addict
Addict

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3914
Location: Berlin, Germany
infratec wrote:
It is not possible to use DrawVectorText() without setting a font before.

[...]

In my opinion the default font should be used if no VectorFont() is set, like for all other Gadgets.

I agree.
Problem confirmed here with PB 5.72 LTS x86 and x64 on Windows 10.

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
 Post subject: Re: DrawVectorText() and the font
PostPosted: Fri Aug 07, 2020 9:28 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Apr 05, 2020 11:28 am
Posts: 234
Location: Pandora
This is also not possible with DrawVectorParagraph()

It seems to have been forgotten to implement this.

Nothing works with vector text if no font is specified.

It is annoying, because you won't get any output if no font is specified.
You wonder why nothing happens and are a bit perplexed at first.

_________________
地球上の平和


Top
 Profile  
Reply with quote  
 Post subject: Re: DrawVectorText() and the font
PostPosted: Mon Sep 14, 2020 9:58 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14090
Location: France
Fixed.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye