procedure TForm1.AddRulers1Click(Sender: TObject);
var
iHObj: Integer;
iLeft: integer;
iTop: integer;
iWidth: Integer;
iHeight: Integer;
begin
iLeft := 0;
iTop := 0;
iWidth := ImageEnVect1.IEBitmap.Width;
iHeight := ImageEnVect1.IEBitmap.Height;
ImageEnVect1.ObjBitmapHandleTransparencyOnSel := true;
ImageEnVect1.FloatDigits := 0;
ImageEnVect1.ZoomObjectsWidth := True;
ImageEnVect1.ObjBoxInnerSelectable := True;
ImageEnVect1.MUnit := ieuPIXELS;
iHObj := ImageEnVect1.AddNewObject;
ImageEnVect1.ObjKind[iHObj] := iekRULER;
ImageEnVect1.ObjName[iHObj] := 'Ruler';
ImageEnVect1.ObjLeft[iHObj] := iLeft;
ImageEnVect1.ObjTop[iHObj] := iTop;
ImageEnVect1.ObjWidth[iHObj] := iWidth;
ImageEnVect1.ObjPenColor[iHObj] := clBlack;
ImageEnVect1.ObjRulerType[iHObj] := iertQUOTECENTER;
ImageEnVect1.ObjPenWidth[iHObj] := 1;
ImageEnVect1.ObjRulerUnit[iHObj] := ieuPIXELS;
ImageEnVect1.SetObjRect(iHObj, Rect(0, 0, iWidth, 0));
ImageEnVect1.Update;
iHObj := ImageEnVect1.AddNewObject;
ImageEnVect1.ObjKind[iHObj] := iekRULER;
ImageEnVect1.ObjName[iHObj] := 'Ruler';
ImageEnVect1.ObjLeft[iHObj] := iLeft;
ImageEnVect1.ObjTop[iHObj] := iTop;
ImageEnVect1.ObjHeight[iHObj] := iHeight;
ImageEnVect1.ObjPenColor[iHObj] := clBlack;
ImageEnVect1.ObjRulerType[iHObj] := iertQUOTECENTER;
ImageEnVect1.ObjPenWidth[iHObj] := 1;
ImageEnVect1.ObjRulerUnit[iHObj] := ieuPIXELS;
ImageEnVect1.SetObjRect(iHObj, Rect(iWidth, 0, iWidth, iHeight));
ImageEnVect1.Update;
end;
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development