SRL Archive - Help

Painting on Smart.


Mat

2012-05-03 17:51:58

When doing this how can you just remove the Text, as I want to keep the FDK image, but I want to changed the text, as it takes a long time to keep loading the paint image.
Any ideas?
Mat
</3

Abu

2012-05-03 17:57:11

I'm thinking you could do:
(*
SMART_ClearCanvasArea
~~~~~~~~~~~~~~~~~~~~~

.. code-block:: pascal

procedure SMART_ClearCanvasArea(Area: TBox);

Clears a specific area of the SMART canvas defined by the box, 'Area'.

.. note::

Author: Coh3n
Last Modified: January 10th, 2012 by Coh3n

Example:

.. code-block:: pascal

SMART_ClearCanvasArea(IntToBox(10, 10, 50, 50));

To clear just the area where text would be and then call in SMART_DrawText

ReadySteadyGo

2012-05-03 18:06:29

Just load the bitmap again and copy the tiny bit you need to repaint. No need to clear anything.

Edit: musafabitmap.copy

Abu

2012-05-03 18:09:40

From: ReadySteadyGo
Just load the bitmap again and copy the tiny bit you need to repaint. No need to clear anything.


Loading the Bitmap again is what he wants to avoid doing?

I have a second suggestion, not sure if it works but:
http://docs.villavu.com/simba/scriptref/window.html?highlight=freeze

Mat

2012-05-03 18:10:58

As the BMP is very large it takes a lot of time to load, and as its constantly under attack I don't want the player to die.

ReadySteadyGo

2012-05-03 18:11:04

From: abu_jwka
Loading the Bitmap again is what he wants to avoid doing?

I have a second suggestion, not sure if it works but:
http://docs.villavu.com/simba/scriptref/window.html?highlight=freeze


Loading a bitmap doesn't cost much, painting to smart does. Mat check my edit.

Abu

2012-05-03 18:12:53

From: ReadySteadyGo
Loading a bitmap doesn't cost much, painting to smart does.


Ahh, clever girl boy…

Just joking, thanks for clearing that up, you had me worried for a second :p

ReadySteadyGo

2012-05-03 18:16:44

From: abu_jwka
Ahh, clever girl boy…

Just joking, thanks for clearing that up, you had me worried for a second :p



I'm on my phone otherwise I would have posted some code :p. I use this method in my scripts.

Mat

2012-05-03 18:24:25

I'm not sure what you mean by:
musafabitmap.copy
Could you explain more <3
Mat
</3

ReadySteadyGo

2012-05-03 18:27:48

It's just a function that copies a specified area of a bitmap which will allow you to only repaint a very small area over the old text before painting over again with the new text. Check the documentation for parameters.

Yago

2012-05-03 21:09:59

Check how I do this in my script.