Results 1 to 8 of 8

Thread: PaintSmart.scar

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

    Default PaintSmart.scar

    how about we have a SMART_DrawTextEx which also has the Clear parameter, it could be used to quickly and easily clear the canvas when someone starts their proggy

    Current:
    Simba Code:
    {*******************************************************************************
    procedure SMART_DrawText(x, y: Integer; font, Text: string; Color: TColor);
    Contributors: Jukka
    Description: Draws a TBox onto the SMART Debug canvas
    *******************************************************************************}

    procedure SMART_DrawText(x, y: Integer; font, Text: string; Color:TColor);
    var
      i, height: integer;
      tpa: tpointarray;
    begin
      tpa := LoadTextTPA(text,font,height);
      for i:= 0 to high(tpa) do
      begin
        tpa[i].x := tpa[i].x + x;
        tpa[i].y := tpa[i].y + y;
      end;
      SMART_DrawDotsEx(false, tpa, Color);
    end;

    My suggestion:
    Simba Code:
    {*******************************************************************************
    procedure SMART_DrawTextEx(Clear: Boolean; x, y: Integer; font, Text: string; Color: TColor);
    Contributors: Jukka, Shuttleu
    Description: Draws text onto the SMART Debug canvas at position x, y
    *******************************************************************************}

    procedure SMART_DrawTextEx(Clear: Boolean; x, y: Integer; font, Text: string; Color:TColor);
    var
      i, height: integer;
      tpa: tpointarray;
    begin
      tpa := LoadTextTPA(text,font,height);
      for i:= 0 to high(tpa) do
      begin
        tpa[i].x := tpa[i].x + x;
        tpa[i].y := tpa[i].y + y;
      end;
      SMART_DrawDotsEx(Clear, tpa, Color);
    end;

    {*******************************************************************************
    procedure SMART_DrawText(x, y: Integer; font, Text: string; Color: TColor);
    Contributors: Shuttleu
    Description: Draws text onto the SMART Debug canvas at position x, y
    *******************************************************************************}

    procedure SMART_DrawText(x, y: Integer; font, Text: string; Color:TColor);
    begin
      SMARTDrawTextEx(False, x, y, font, Text, Color);
    end;

    ~shut
    Last edited by Shuttleu; 11-17-2010 at 10:58 PM.

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

    Default

    I agree with this.
    Why not? DrawDotsEx has a clear parameter..

    Also, just because I like to do stuff in a specific way, place Clear as the last parameter and X and Y first

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

  4. #4
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Why is this in the Reflection section? Also, you may want to update the descriptions.

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

  6. #6
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    i didnt mean to put it in reflection :s
    the description is what it is in the actual files

    ~shut
    I'll move it, and they still need to be updated, whether you wrote them, or someone else.

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

  8. #8
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Beauty. Tested and committed. Thanks.

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
  •