ChanServ changed the topic of #haiku-3rdparty to: Third party devtalk for the Haiku® operating system | Main Haiku channel: #haiku | Bored? Tons of stuff to work on here: https://github.com/HaikuArchives | Logs: https://oftc.irclog.whitequark.org/haiku-3rdparty
chilledfrogs has quit [Quit: connection reset by purr]
chilledfrogs has joined #haiku-3rdparty
Mibi88 has joined #haiku-3rdparty
<Mibi88> Hello, I'm trying to draw some text in a BView. I'm able to draw rectangles in it, but not text. I'm calling SetFont(be_fixed_font); SetFontSize(67.0); DrawString("Hello World!", new BPoint(1, 1), 0);, but no text appears. What am I doing wrong?
<Mibi88> Note: my knowledge of C++ is quite limited, I'm used to C
<augiedoggie> my first guess is that you need to move the point down in the y direction
<augiedoggie> that's the baseline point, iirc the string is drawn above it
<Mibi88> I tried drawing it at 100, 100, but nothing appears
<augiedoggie> i don't usually use that version of DrawString(), i usually do view->MovePenTo() and then DrawString() without the point param
<augiedoggie> it could be that the HighColor of the view is set to white
<augiedoggie> could try a view->SetHighColor(0, 0, 0) to be sure
<augiedoggie> the high color should default to black though
<Mibi88> Thanks! I got it working by using MovePenTo and then DrawString by passing only the string.
<augiedoggie> nie
<augiedoggie> nice
<Mibi88> When resizing the window the View isn't redrawn properly, so I think that I misunderstood something about the coordinates: are they relative to the top of the rectangle to update?
yann64 has joined #haiku-3rdparty
<augiedoggie> depending on what you're doing, you may need the B_FULL_UPDATE_ON_RESIZE flag set when you create the view
<augiedoggie> i have to leave for work now though, sorry
<Mibi88> Ok, thanks for all your help!
jmairboeck has joined #haiku-3rdparty
yann64 has quit [Quit: Leaving]
Mibi88 has quit [Ping timeout: 480 seconds]
jmairboeck has quit [Quit: Konversation terminated!]
chilledfrogs has quit [Quit: connection reset by purr]
chilledfrogs has joined #haiku-3rdparty