No. you need draw you "perfect" image "like a chat" in jDrawingView before add it to jScrollView.
So I can draw an image, setting its width according to
ScollView.Width with a transparent background and just draw the part I need, either on the left or right side? It makes sense but I can't actually draw anything. Whatever I do, it always adds white rectangle, around 1/3 the screen width and more than 100% height.
1. How can I set the size of the image?
2. How can I actually apply my drawing to the image? I've tried many things, one of them:
procedure TKapp.BtnClick(Sender: TObject);
var msg: string;
tw,th: single;
begin
tw:=jDrawingView1.GetTextWidth(MsgEdit.Text);
th:=jDrawingView1.GetTextHeight(MsgEdit.Text);
jDrawingView1.Width :=ScrollView.Width;
jDrawingView1.Height:=Round(th)+10;
jDrawingView1.DrawBackground($00FF00);
//jDrawingView1.Clear(colbrRed); <-I also tried this, I assume it cleans the bitmap and sets the background color??
jDrawingView1.PaintColor:=colbrDimGray;
jDrawingView1.DrawRoundRect(0,0,Round(tw)+10,Round(th)+10,15,15);
jDrawingView1.PaintColor:=colbrBlack;
jDrawingView1.DrawText(MsgEdit.Text,5,5);
ChatScrollView.AddImage(jDrawingView1.GetImage();
//ChatScrollView.AddImage(jDrawingView1.GetImage(),0,scaleFitXY); <-I also tried this. I assumed that scaleFitXY makes it follow image's original dimensions?
end.
what am I doing wrong? DrawView doesn't have anything like CreateBitmap(x,y,color) as jCanvas does so I assume that I should use DrawView.width and height to set the size or I'm completely mistaken?
Thanks in advance!