Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools
Old 09-15-2023, 02:37 PM   #1
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Somewhere over the Rainbow
Posts: 6,966
Default API:gfx.blit/gfx.drawstr disappears text/image, when gfx.y and/or gfx.x is too low

When setting gfx.y too low, the text that shall be shown by gfx.drawstr disappears.

In the following code, the text isn't shown at all:
Code:
gfx.setfont(1, "Arial", 18, 0)
function main()
  gfx.x=1
  gfx.y=-18
  gfx.drawstr("BreadFan\nTudelu\nOhMyGod\n123\nOhNoMoreTests")
  reaper.defer(main)
end

main()
However, if I set gfx.y to -17, it is partially shown again, as I expect it to be.

I try to code a scrolling engine, where text might be scrolled out to the top, but this bug prevents me from doing it.

Edit:
gfx.x is also affected. Textlines not visible in the window get cut off. That means, if the first line isn't visible, the second line becomes the first line now, if visible.

Code:
gfx.setfont(1, "Arial", 18, 0)
function main()
  gfx.x=1
  gfx.y=1
  gfx.drawstr("1\n22\n333\n4444")
  reaper.defer(main)
end

main()
shows all lines, but changing gfx.x to -10 makes the 1 disappear, putting the line with 2 to the top.

Last edited by Meo-Ada Mespotine; 10-02-2023 at 11:51 AM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 10-02-2023, 12:03 PM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Somewhere over the Rainbow
Posts: 6,966
Default

It only happens, when using a different font than the standard system font.
Like Arial or Time New Roman.
Meo-Ada Mespotine is offline   Reply With Quote
Old 10-03-2023, 07:12 PM   #3
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 16,783
Default

ah yes, thanks, fixing!
Justin is offline   Reply With Quote
Old 10-04-2023, 09:06 AM   #4
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Somewhere over the Rainbow
Posts: 6,966
Default

Thank you
Meo-Ada Mespotine is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.