/* * Original source * Copyright (C) 1996,1997 by * * Jan Hubicka (hubicka@paru.cas.cz) * Thomas Marsh (tmarsh@austin.ibm.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ // Some parts of this sorce were added and changed to be applied for Japanese // by jun hirabayashi jun@hirax.net // This works only under Borland C++ Builder. { int l,l2; AnsiString aText, bText; int CharCount = 1; BYTE *ptr; int skip = 10; int s; AnsiString data[65536]; for (int y = 0; y < ImageBitmap->Height; y++) { l = 0; l2 = 0; ptr = (BYTE *)ImageBitmap->ScanLine[y]; for (int x = 0; x < ImageBitmap->Width; x++, ptr+=3) { if (!l2) { if(CharCount > Memo_InputText->Text.Length()) CharCount = 1; aText = Memo_InputText->Text.SubString(CharCount,2); CharCount+=2; if(aText[1]=='\r')aText = "@"; } else aText = "@"; if (!l && x > skip) s = - ( ptr[0] /29); else s= 0; s += skip; s = x - s; if (s < 0) bText = aText; else aText = data[s]; data[x] = aText; Memo_Output->Lines->Text = Memo_Output->Lines->Text + aText; } Memo_Output->Lines->Text = Memo_Output->Lines->Text + "\n"; } }