Results 1 to 11 of 11

Thread: Painting on Smart.

  1. #1
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default Painting on Smart.

    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



    ^^

  2. #2
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    I'm thinking you could do:
    Simba Code:
    (*
    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

  3. #3
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    456
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

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

    Edit: musafabitmap.copy
    Last edited by ReadySteadyGo; 05-03-2012 at 10:09 PM.

  4. #4
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by ReadySteadyGo View Post
    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/script...ghlight=freeze

  5. #5
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

    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.



    ^^

  6. #6
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    456
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    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/script...ghlight=freeze
    Loading a bitmap doesn't cost much, painting to smart does. Mat check my edit.

  7. #7
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by ReadySteadyGo View Post
    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

  8. #8
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    456
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    Ahh, clever girl boy...

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

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

  9. #9
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

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



    ^^

  10. #10
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    456
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    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.

  11. #11
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Check how I do this in my script.
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •