Results 1 to 8 of 8

Thread: Clearing SMART debug canvas

  1. #1
    Join Date
    May 2007
    Location
    Everywhere
    Posts
    1,428
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default Clearing SMART debug canvas

    I can get stuff on there but I can't seem to get it off. I see the procedure ClearRSCanvas, but I don't know what to put as the canvas (or rather what TCanvas goes in there). Is this even possible?



    Also quick 2nd question: Any way to paste BMP's on the smart debug as well?

  2. #2
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  3. #3
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Off topic a little bit but the current Paintsmarts we have tend to paint stuff over each other instead of clearing it then painting it. I found this annoying so I just us my own function to place a report on the SMARTs debug canvas.

    Perhaps this is the reason your asking for a clearing function as well?
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  4. #4
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Narcle View Post
    Off topic a little bit but the current Paintsmarts we have tend to paint stuff over each other instead of clearing it then painting it. I found this annoying so I just us my own function to place a report on the SMARTs debug canvas.

    Perhaps this is the reason your asking for a clearing function as well?
    maybe this could help?
    http://villavu.com/forum/showthread....034#post750034

    ~shut

  5. #5
    Join Date
    May 2007
    Location
    Everywhere
    Posts
    1,428
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    try this
    Simba Code:
    procedure ClearSmart;
    var
      drawing : TBitmap;
    begin
      drawing := TBitmap.Create;
      drawing.canvas.handle := SmartGetDebugDC;

      ClearRSCanvas(drawing.canvas);

      FreeBitmap(drawing);
    end;
    Works beautifully, thank you

    EDIT: Is it possible to draw BMP's on the debug? J/W


    Quote Originally Posted by Narcle View Post
    Perhaps this is the reason your asking for a clearing function as well?
    The reason I wanted this is so I can make a status bar to my next level
    Maybe not the best use of the debug... XD



    EDIT:
    Code:
    Error: Exception: The bitmap[203679864] does not exist at line 48
    Crashes simba, highlights the Free Bitmap line
    Last edited by Cstrike; 11-17-2010 at 01:33 AM.

  6. #6
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by cstrike View Post
    Works beautifully, thank you

    EDIT: Is it possible to draw BMP's on the debug? J/W
    im sure there is, but i dont know how to do it, im terrible when it comes to canvas'

    ~shut

    EDIT: try this
    Simba Code:
    procedure ClearSmart;
    var
      drawing : TBitmap;
    begin
      drawing := TBitmap.Create;
      drawing.canvas.handle := SmartGetDebugDC;

      ClearRSCanvas(drawing.canvas);

      try
        FreeBitmap(drawing);
      except end;
    end;
    Last edited by Shuttleu; 11-17-2010 at 01:38 AM.

  7. #7
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Do you have to use TBitmap? If not, try using CreateBitmap(Bitmap); instead

  8. #8
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    @Narcle

    Then just fix PaintSmart...

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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