DK11 for Delphi | GisViewer.TGIS_Viewer.MapToScreenRect | Constructors | Fields | Methods | Properties | Events
Converts rectangle coordinates from map related to screen related.
Implements IGIS_Viewer.MapToScreenRect.
// Delphi public function MapToScreenRect( const _rct : TGIS_Extent ) : TRect;
// C++ Builder public: TRect* MapToScreenRect( TGIS_Extent* const _rct );
Name | Type | Description |
---|---|---|
_rct | TGIS_Extent | coordinate in map units |
Type | Description |
---|---|
TRect | Calculated screen rectangle. |
var ptA, ptB : TPoint ; ll : TGIS_LayerVector ; shp : TGIS_Shape ; Rec : TRect; begin // let's get a layer ll := TGIS_LayerVector( GIS.Get('realpoints') ); // then a shape shp := ll.GetShape( _shape.Uid ) ; // find points ptA := _shape.Viewer.MapToScreen( shp.GetPoint( 0, 0 ) ) ; ptB := _shape.Viewer.MapToScreen( _shape.GetPoint( 0, 0 ) ) ; // and rectangle coordinates rec := _shape.Viewer.MapToScreenRect (_shape.Extent); dosomething(); end ;