trichview.com

trichview.support




Re: fastest way to use trichview


Return to index


Author

Message

ian

Posted: 11/26/2004 19:03:00


Maybe 1 solution for me ... But with 1 big problem:


procedure TForm1.RVStyle2DrawStyleText(Sender: TRVStyle; const s: String;

  Canvas: TCanvas; StyleNo, SpaceBefore, Left, Top, Width, Height: Integer;

  DrawState: TRVTextDrawStates; var DoDefault: Boolean);

var bitmap: tbitmap;

begin

  if s=':)' then

  begin

    bitmap:=tbitmap.Create;

    bitmap.LoadFromFile('d:\temp\smile.bmp');

    canvas.Draw(left,top ,bitmap);

    bitmap.free;

    dodefault:=false;

  end;

end;


I add a text with style 99 ... the text are a smiley .. So i just have to

test the smiley and draw a bitmap here ...

But the problem : i can't say to richview to continue to draw after then

width of bitmap ...

As the bitmap are larger than the ":)" i got a big problem here :(


Second problem, the smiley can have a color code and a finger code so then

ascii can have this :

4:-)@ar


so i cannot say than the text have always the same size ...

And the stretchdraw don't look good ...


Soooooo close and got this problem :(





Powered by ABC Amber Outlook Express Converter