SRL Archive - SRL Archives

CreateTPAFromText/BMP...


n3ss3s

2008-03-30 08:33:21

returns TPA of only the upchars font even you would give it StatChars or SmallChars etc…

I've got no fix.

Dumpin

2008-03-30 15:04:11

Wouldn't TPAToText not even cooler? :o

Wizzup?

2008-04-03 08:20:59

Do you mean this function?

{*******************************************************************************
Function Function LoadTextTPA(Text : String; Chars : Integer;var height : integer) : TPointArray;
By: Raymond
Description: Loads a TPA of the text.. It also returns the real height
of the Text.. Used in FindTextTPAinTPA
*******************************************************************************}
Function LoadTextTPA(Text : String; Chars : Integer;var height : integer) : TPointArray;
var
DC : HDC;
CTS,w,h : INteger;
BMP : Integer;
begin;
BMP := CreateBitmapMaskFromText(Text,Chars);
DC := GetClientCanvas.Handle;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(0);
GetBitmapSize(BMP,W,H);
SetTargetDc(GetBitmapDc(BMP));
FindColorsTolerance(Result,clwhite,0,0,w+1,h+1,0);
height := h - 1;
SetTargetDC(DC);
ColorToleranceSpeed(CTS);
FreeBitmap(BMP);
end;

n3ss3s

2008-04-03 10:16:36

Do you mean I mean or Dumpin mean? :p


I don't mean that, I used the one in Math.scar…



{*******************************************************************************
Function CreateTPAFromText(Txt : String; Chars : Integer) : TPointArray;
By: MastaRaymond
Description: Returns the TPointArray of the inputted Text. Needs Wizzyplugin
*******************************************************************************}

Function CreateTPAFromText(Txt : String; Chars : Integer) : TPointArray;
var
TempBMP : integer;
begin;
TempBMP := CreateBitmapMaskFromText(Txt,upchars);
Result := CreateTPAFromBMP( GetBitmapDC(TempBMP));
FreeBitmap(TempBMP);
end;

mastaraymond

2008-04-03 10:17:08

{*******************************************************************************
Function CreateTPAFromText(Txt : String; Chars : Integer) : TPointArray;
By: MastaRaymond
Description: Returns the TPointArray of the inputted Text. Needs Wizzyplugin
*******************************************************************************}

Function CreateTPAFromText(Txt : String; Chars : Integer) : TPointArray;
var
TempBMP : integer;
begin;
TempBMP := CreateBitmapMaskFromText(Txt,upchars);
Result := CreateTPAFromBMP( GetBitmapDC(TempBMP));
FreeBitmap(TempBMP);
end;

I see x). Fixed.

n3ss3s

2008-04-03 10:30:11

You posted the wrong one :p

This is the fix:


{*******************************************************************************
Function CreateTPAFromText(Txt : String; Chars : Integer) : TPointArray;
By: MastaRaymond
Description: Returns the TPointArray of the inputted Text. Needs Wizzyplugin
*******************************************************************************}

Function CreateTPAFromText(Txt : String; Chars : Integer) : TPointArray;
var
TempBMP : integer;
begin;
TempBMP := CreateBitmapMaskFromText(Txt,chars);
Result := CreateTPAFromBMP( GetBitmapDC(TempBMP));
FreeBitmap(TempBMP);
end;


mastaraymond

2008-04-03 10:31:30

From: n3ss3s
You posted the wrong one :p

This is the fix:


{*******************************************************************************
Function CreateTPAFromText(Txt : String; Chars : Integer) : TPointArray;
By: MastaRaymond
Description: Returns the TPointArray of the inputted Text. Needs Wizzyplugin
*******************************************************************************}

Function CreateTPAFromText(Txt : String; Chars : Integer) : TPointArray;
var
TempBMP : integer;
begin;
TempBMP := CreateBitmapMaskFromText(Txt,chars);
Result := CreateTPAFromBMP( GetBitmapDC(TempBMP));
FreeBitmap(TempBMP);
end;


I know ;)