for(i=0;i<sStr.Length();i++)
{//要特别注意:在andorid中SubString索引是从0开始,但在win32中,要从1开始,所以如果在
s = sStr.SubString(i,1);//win32下,该行要改为 sStr.SubString(i+1,1),折腾死了!
if(s == L":") ShowNum(X + i * 19,Y+5,10);//显示:
else ShowNum(X + i*19,Y+5,StrToInt(s));//显示数字,高度增加5个单位。
}
//---------------------------------------------------------------------------
void __fastcall TForm3D1::ShowSum(int X,int Y,int iNum)
{
TRectF showRect;
Image1->Bitmap->Canvas->BeginScene();
showRect.init(X + 10,Y, X + 22, Y + 16);
//写一个数字。
Image1->Bitmap->Canvas->FillText(showRect,IntToStr(iNum), false, 100,
TFillTextFlags() << TFillTextFlag::RightToLeft, TTextAlign::Center,
TTextAlign::Center);
Image1->Bitmap->Canvas->EndScene();
}
//---------------------------------------------------------------------------