TImageEnView supports multiple layers, allowing the creation of a single image from multiple source images (which can be resized, rotated, moved, etc).
TIEAngleLayer is a descendent of TIELayer that displays an angle formed from three points, and a label showing the angle value.
// All of the following produce an angle similar to this
xx := 100; yy := 100;
// SET BY POINTS
ImageEnView1.LayersAdd( ielkAngle ); with TIEAngleLayer( ImageEnView1.CurrentLayer ) do begin LineWidth := 2; LineColor := clDkGray; LabelFont.Color := clBlue; LabelFont.Style := [fsBold];
// Set by points on bitmap SetPoints( 0, xx + 180, yy + 130, iepbBitmap ); SetPoints( 1, xx + 0 , yy + 130, iepbBitmap ); SetPoints( 2, xx + 130, yy + 0 , iepbBitmap );
// Which is the same as: // SetPoints( [ Point( xx + 130, yy + 0 ), Point( xx + 0, yy + 130 ), Point( xx + 130, yy + 0 ), iepbBitmap ); end; ImageEnView1.Update();
// SET BY SIZE
ImageEnView1.LayersAdd( ielkAngle ); with TIEAngleLayer( ImageEnView1.CurrentLayer ) do begin PosX := xx; PosY := yy;
// Note: Size is larger than above because we must take text and arc into account Width := 209; Height := 159; LineWidth := 2; LineColor := clDkGray; LabelFont.Color := clBlue; LabelFont.Style := [fsBold];
// Set as a percentage (actually range from 0 - 1000) of the width SetPoints( 0, 1000, 1000 ); SetPoints( 1, 0 , 1000 ); SetPoints( 2, 720 , 0 );
// Which is the same as: // SetPoints( [ Point( 1000, 1000 ), Point( 0, 1000 ), Point( 720 , 0 ) ], iepbBitmap ); end; ImageEnView1.Update();
// SET BY ANGLE
ImageEnView1.LayersAdd( ielkAngle ); with TIEAngleLayer( ImageEnView1.CurrentLayer ) do begin PosX := xx; PosY := yy;
// Note: Size is larger than above because we must take text and arc into account // Even then, result will be different because we do not set the line lengths Width := 209; Height := 159; LineWidth := 2; LineColor := clDkGray; LabelFont.Color := clBlue; LabelFont.Style := [fsBold];
// Set by angle StartAngle := 0; SweepAngle := 45; end; ImageEnView1.Update();