Results 1 to 3 of 3

Thread: Clearing Smart Debug...

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

    Default Clearing Smart Debug...

    Well.. I've been trying to clear the SmartDebug in several ways, but am still failing to succeed. Not too surprised considering I've never attempted something like it before.

    SCAR Code:
    //clearing SmartDebug
      SetTransparentColor(drawing, clBlack);
      FastDrawClear(drawing, clBlack);

    This gives me an access error on setting transparency.

    Not being able to set transparency, I don't know how else to approach it.. I've tried several refresh methods, but none of them worked..

    Any ideas.. ? Anyone who actually knows how to do this?

    ~RM

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

  2. #2
    Join Date
    Jul 2008
    Location
    England
    Posts
    763
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Meh, this is how I do it:

    SCAR Code:
    function SmartDrawBitmap(BMP, x, y: Integer): Boolean;
    var
      SmartCan: TCanvas;

    begin
      if not SmartActive then Exit;
      try
        SmartCan := GetBitmapCanvas(BMP);
        SmartCan.Handle := SmartGetDebugDC;
        SafeDrawBitmap(BMP, SmartCan, x, y);
        Result := True;
      except
        Result := False;
      end;
    end;

    function SmartClearCanvas: Boolean;
    var
      BMP: Integer;

    begin
      if not SmartActive then Exit;
      try
        BMP := BitmapFromString(765, 503, '');
        Result := SmartDrawBitmap(BMP, 0, 0);
      except
        Result := False;
      finally
        FreeBitmap(BMP);
      end;
    end;
    lol

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

    Default

    Heh, I came to the same conclusion jsut a minue ago

    SCAR Code:
    //clearing SmartDebug
      CleanBMP := BitmapFromString(MSX2, MSY2, '');
      SafeDrawBitmap(CleanBMP, drawing.canvas, 0, 0);

    Thank you anyway

    ~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)

Posting Permissions

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