Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
pic from sd card how do make it a background if place text on it disapears where text is get black background
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2557
Posted: 03:03am 18 Jun 2025
Copy link to clipboard
Print this post
If your display supports transparent text set bc to -1. If not using other optional parameters you still need a coma to show where they belong. Eg TEXT x, y, string$ , , , , , -1
The catch is when you change the text it will be on top of the old text so the total number of characters needs to be the same by adding leading or trailing spaces to equal the longest line. eg
txt1$ = "Hello World" txt2$ = " Earth "
This works for VGA mode 1 but for colour modes you will need to save an image of the area where the text is going to be (before running the program perhaps) with:- SAVE IMAGE file$, x, y, w, h and load that image before changing the text.
> gui test lcdpanel 'stop with Ctrl-C to retain image > save image "txtspace.bmp", 99,99,99,15 > text 99,99,"Hello World",,,,,-1 > load image "txtspace.bmp", 130,99 :text 99,99,"Earth",,,,0,-1 >
Edited 2025-06-18 15:27 by phil99
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1213
Posted: 06:38am 18 Jun 2025
Copy link to clipboard
Print this post
using Layer:
MODE 2:CLS FRAMEBUFFER layer Load image "BG.BMP" FRAMEBUFFER write L CLS text 99,99,"Hello World" do:loop until Inkey$=chr$(27)