T O P I C R E V I E W |
john_siggy@yahoo.com |
Posted - Nov 16 2017 : 11:32:21 I am trying to paint rectangular annotations from an ImageEnVect to an ImageEnView. Location and Size of the rectangles is wrong. Thanks in advance.
Code:
Mult := ImageEnView1.Bitmap.Height / ImageEnVect2.Bitmap.Height; {wrong} for i := 0 to ImageEnVect2.ObjectsCount - 1 do begin with ImageEnView1.GetCanvas do begin Pen.Color := Colors[1]; Pen.Width := 2; Brush.Style := bsClear; Rectangle( Round(ImageEnVect2.ObjLeft[i] * Mult), Round(ImageEnVect2.ObjTop[i] * Mult), Round(ImageEnVect2.ObjRight[i] * Mult), Round(ImageEnVect2.ObjBottom[i] * Mult)) end; end;
|
1 L A T E S T R E P L I E S (Newest First) |
john_siggy@yahoo.com |
Posted - Nov 16 2017 : 14:51:43 Found the answer: Rectangle( ImageEnView1.Xbmp2Scr(ImageEnVect1.ObjLeft[i]), ImageEnView1.Ybmp2Scr(ImageEnVect1.ObjTop[i]), ImageEnView1.Xbmp2Scr(ImageEnVect1.ObjRight[i]), ImageEnView1.Ybmp2Scr(ImageEnVect1.ObjBottom[i])); ); |
|
|