SRL Archive - OSR Help

Painting on SMART - PLEAS ASSIST :)


footballjds

2012-12-14 17:28:42

Hello all. My question is simple, I hope the answer is as well. I have a banner at the top of my script. I want to paint text over this banner. It's used as a progress report so the text will be updating very often. I do not want to clear the canvas cause I don't want to repaint the banner every 10th of a second. The text over-writes the previous text making it impossible to read.

Solution?

EDIT: PLEASE*

Brandon

2012-12-14 17:34:56

From: footballjds
Hello all. My question is simple, I hope the answer is as well. I have a banner at the top of my script. I want to paint text over this banner. It's used as a progress report so the text will be updating very often. I do not want to clear the canvas cause I don't want to repaint the banner every 10th of a second. The text over-writes the previous text making it impossible to read.

Solution?

EDIT: PLEASE*


That's going to be really difficult as you only have 1 DC to work with (The debug DC). The only way I can think of is to create a transparent form, set parent to Smart and paint on the form.

Other than that, you might find yourself doing exactly what you don't want to have to do.

If you want, you can also try making an interactive GUI: http://villavu.com/forum/showthread.php?t=65657


EDIT: Another option is to Crop a part of the bitmap that will have your text, Wipe that portion of the old Text off of Smart's DC and just paint back that portion with the new text on top. Is there a reason you don't want to just repaint onto the DC? It doesn't take too much CPU. Also Smart won't draw when minimized so it shouldn't be much of a problem.

Mr[S]

2012-12-14 17:35:52

I see it's coming closer and closer to release date, if you need me again hit me with pm dude

DannyRS

2012-12-14 17:36:25

My edgeville script, and any of flights ones have a good paint method, i dont understand it greatly though so you'd have to just copy it :)

I think it does what your after, writes normal text over the image but doesent change the image?

Edit - the fact brandon says its hard means i must have misuderstood what your trying to achieve, goodluck :)

Olly

2012-12-14 19:04:49

Take a look at my agility script, all you do is paint the banner once (or every time you log in due to smart restarting) and you just paint a small box over the old text and paint new.. simple aye :p

footballjds

2012-12-14 22:31:22

From: Ollybest
Take a look at my agility script, all you do is paint the banner once (or every time you log in due to smart restarting) and you just paint a small box over the old text and paint new.. simple aye :p


Yeah, i agree with you and brandon on this being the best option. Thank you!
for now I'm just clearing and re-writing everything.