ENCX::S57Draw Class Reference

Display a continuous S-57 vector chart via a Win32 Device Context. More...

import "_encxcom_encx.idl";

Inheritance diagram for ENCX::S57Draw:

List of all members.

Public Member Functions

HRESULT SetManager ([in] IS57Manager *pMgr)
 Connect to a SENC. All the S-57 data to be drawn on the device context will be obtained from pMgr.
HRESULT Draw ([in] OLE_HANDLE lHDC)
 Draw the chart to the specified device context.
HRESULT SetDisplayScale ([in] LONG nDisplayScale,[in] IPixelPoint *ipPixelPt)
 Set the nominal scale of the chart. Suitable for display to the user, but not for precise calculations.
HRESULT CalculateNewDisplayScale ([out] VARIANT_BOOL *pbAllowed,[out] LONG *pnScaleOut,[in] LONG nScaleOld,[in] LONG nChange,[in] LONG nSmallestChangeAllowed)
 Obtain the sensible next scale in the specified direction.
HRESULT SetDrawLayerCallback ([in] enum S57CallBackDrawAction callBackDrawAction,[in] IS57ProductAndUsage *iproductAndUsage,[in] BYTE Layer)
 Insert a callback into the drawing sequence.
HRESULT SetPosition ([in] IGeoPoint *geoPt,[in] IPixelPoint *pixelPt,[out, retval] VARIANT_BOOL *bRes)
 Set the geographical position at the specified pixel position on the drawing surface.
HRESULT SetPositionAndScale ([in] IGeoRect *geoRect,[out, retval] VARIANT_BOOL *bRes)
 Set the geographical position and scale so that the specified rectangle just fits on the drawing surface.
HRESULT SetDirectionOfUp ([in] DOUBLE degrees,[in] IPixelPoint *ipPixelPt,[out, retval] VARIANT_BOOL *pVal)
 The geographical orientation of the drawing surface.
HRESULT FeaturesAtPoint ([in] IPixelPoint *pixelPt,[out, retval] IS57DrawnFeatures **pVal)
HRESULT AdjustAreaSymbolOffsets ([in] LONG cx,[in] LONG cy)
 Call with the offset of each scrolling action.
HRESULT SetPositionAndScaleExact ([in] IGeoRect *geoRect,[out, retval] VARIANT_BOOL *bRes)
 Set the geographical position and scale so that the specified rectangle exactly. The corners of the drawing surface will correspond to the corners of the GeoRect. Use with caution - this method allows you to create some unlikely shaped charts!
HRESULT GetSize ([out, retval] IPixelSize **sz)
 The area inside the rectangle (0,0) to (Size.Width,Size.Height) will be drawn.
HRESULT SetSize ([in] IPixelSize *sz)
 The area inside the rectangle (0,0) to (Size.Width,Size.Height) will be drawn.
HRESULT DepthAtPoint ([in] IPixelPoint *pixelPt,[out] DOUBLE *depthInMetres,[out, retval] VARIANT_BOOL *succeeded)
 Get the depth at a pixel position within the view.
HRESULT OnDrawLayer (OLE_HANDLE hdc, enum S57CallBackDrawAction action, IS57ProductAndUsage *ProductAndUsage, BYTE Layer)
 Occurs before or after an S-57 layer is drawn.

Properties

LONG * DisplayScale [get]
 The nominal scale of the chart. Suitable for display to the user, but not for precise calculations.
IGeoPix ** GeoPix [get]
 Obtain the geopix.
IGeoPoint ** PositionOfCentre [get]
 Obtain the geographical positon of the centre of the drawing surface.
IS57DisplaySettings ** DisplaySettings [get]
 The display settings control the symbolisation (drawing style) and what types of object are drawn or excluded from the drawing.
IS57DisplaySettingsDisplaySettings [set]
 The display settings control the symbolisation (drawing style) and what types of object are drawn or excluded from the drawing.
DOUBLE * PixelSizeMetres [get]
 The nominal size of a pixel.
DOUBLE PixelSizeMetres [set]
 The nominal size of a pixel.
DOUBLE * DirectionOfUp [get]
 The geographical orientation of the drawing surface.
IGeoRect ** GeoExtent [get]
 The geographical rectangle of the drawing surface.
IDisplayPalette ** DisplayPalette [get]
 The colour scheme for the chart. Use to draw the chart with lower luminance for twilight and night viewing.
IDisplayPaletteDisplayPalette [set]
 The colour scheme for the chart. Use to draw the chart with lower luminance for twilight and night viewing.
VARIANT_BOOL * ShowPreviousCells [get]
 Draw the S-57 cells using the previous updates. Off by default.
VARIANT_BOOL ShowPreviousCells [set]
 Draw the S-57 cells using the previous updates. Off by default.


Detailed Description

Display a continuous S-57 vector chart via a Win32 Device Context.

Supports

Properties and methods via IS57Draw.

Notifications via _IS57DrawEvents.

Definition at line 3558 of file _encxcom_encx.idl.


Member Function Documentation

HRESULT IS57Draw::SetManager ( [in] IS57Manager pMgr  )  [inherited]

Connect to a SENC. All the S-57 data to be drawn on the device context will be obtained from pMgr.

HRESULT IS57Draw::Draw ( [in] OLE_HANDLE  lHDC  )  [inherited]

Draw the chart to the specified device context.

HRESULT IS57Draw::SetDisplayScale ( [in] LONG  nDisplayScale,
[in] IPixelPoint ipPixelPt 
) [inherited]

Set the nominal scale of the chart. Suitable for display to the user, but not for precise calculations.

Set nominal scale of the chart. Suitable for display to the user, but not for precise calculations. The pixel position is the pixel position where the relationship between geographic position and pixel position is constant. When zooming in and out with the mouse wheel or a hot key and the mouse is over the chart using the mouse position is a good idea! Use -1,-1 to default to center of the view.

HRESULT IS57Draw::CalculateNewDisplayScale ( [out] VARIANT_BOOL *  pbAllowed,
[out] LONG *  pnScaleOut,
[in] LONG  nScaleOld,
[in] LONG  nChange,
[in] LONG  nSmallestChangeAllowed 
) [inherited]

Obtain the sensible next scale in the specified direction.

The S57Draw will display the S-57 data at any scale. However this method provides scales that are typically as expected by a mariner.

Positive nChange values mean zooming in. Negative means zoom out. A value of 1 indicates zooming by one "notch", 2 by notches and so on.

The first out parameter (pbAllowed) is whether or not this calculation succeedded in producing a valid output scale. The second output parameter (pnScaleOut) is the suggested scale.

The scales output by CalculateNewDisplayScale are 1:1000, 1:2000, 1:4000, 1:5000, 1:7500 and similarly for other decades.

CalculateNewDisplayScale is a helper function. It does not affect the state of the S57Draw.

HRESULT IS57Draw::SetDrawLayerCallback ( [in] enum S57CallBackDrawAction  callBackDrawAction,
[in] IS57ProductAndUsage iproductAndUsage,
[in] BYTE  Layer 
) [inherited]

Insert a callback into the drawing sequence.

Results in _IS57DrawEvents::OnDrawLayer() being called during the drawing process.

Parameters:
callBackDrawAction  When the callback should occur (before the layer is drawn, after it, or both)
iproductAndUsage  The type of S-57 (e.g. ENC) and the intended usage band within that product (e.g. a navigational purpose within the ENC product).
Layer  There are 10 layers of drawing within a single product and usage. Layer 0 is the bottom, Layer 9 is the top.

HRESULT IS57Draw::SetPosition ( [in] IGeoPoint geoPt,
[in] IPixelPoint pixelPt,
[out, retval] VARIANT_BOOL *  bRes 
) [inherited]

Set the geographical position at the specified pixel position on the drawing surface.

HRESULT IS57Draw::SetPositionAndScale ( [in] IGeoRect geoRect,
[out, retval] VARIANT_BOOL *  bRes 
) [inherited]

Set the geographical position and scale so that the specified rectangle just fits on the drawing surface.

HRESULT IS57Draw::SetDirectionOfUp ( [in] DOUBLE  degrees,
[in] IPixelPoint ipPixelPt,
[out, retval] VARIANT_BOOL *  pVal 
) [inherited]

The geographical orientation of the drawing surface.

HRESULT IS57Draw::FeaturesAtPoint ( [in] IPixelPoint pixelPt,
[out, retval] IS57DrawnFeatures **  pVal 
) [inherited]

HRESULT IS57Draw::AdjustAreaSymbolOffsets ( [in] LONG  cx,
[in] LONG  cy 
) [inherited]

Call with the offset of each scrolling action.

Adjusts the origin used when filling an area with symbols.

If AdjustAreaSymbolOffsets is used, then area fill symbols will scroll with the area features.

If AdjustAreaSymbolOffsets is not used, then area fill symbols will be fixed with respect to the drawing surface and will appear to be moving backwards in relation to the area features.

HRESULT IS57Draw::SetPositionAndScaleExact ( [in] IGeoRect geoRect,
[out, retval] VARIANT_BOOL *  bRes 
) [inherited]

Set the geographical position and scale so that the specified rectangle exactly. The corners of the drawing surface will correspond to the corners of the GeoRect. Use with caution - this method allows you to create some unlikely shaped charts!

HRESULT IS57Draw::GetSize ( [out, retval] IPixelSize **  sz  )  [inherited]

The area inside the rectangle (0,0) to (Size.Width,Size.Height) will be drawn.

HRESULT IS57Draw::SetSize ( [in] IPixelSize sz  )  [inherited]

The area inside the rectangle (0,0) to (Size.Width,Size.Height) will be drawn.

HRESULT IS57Draw::DepthAtPoint ( [in] IPixelPoint pixelPt,
[out] DOUBLE *  depthInMetres,
[out, retval] VARIANT_BOOL *  succeeded 
) [inherited]

Get the depth at a pixel position within the view.

HRESULT ENCX::_IS57DrawEvents::OnDrawLayer ( OLE_HANDLE  hdc,
enum S57CallBackDrawAction  action,
IS57ProductAndUsage ProductAndUsage,
BYTE  Layer 
) [inherited]

Occurs before or after an S-57 layer is drawn.


Property Documentation

LONG* IS57Draw::DisplayScale [get, inherited]

The nominal scale of the chart. Suitable for display to the user, but not for precise calculations.

IGeoPix ** IS57Draw::GeoPix [get, inherited]

Obtain the geopix.

The IGeoPix ca nbe used to draw georeferenced information on top of the S-57 data and to obtain a geographical position from a pixel position.

IGeoPoint ** IS57Draw::PositionOfCentre [get, inherited]

Obtain the geographical positon of the centre of the drawing surface.

The result returned is a snapshot of the centre position rather than a live reference to the internal state of the S57Draw object. in .NET ReferenceEquals(draw.PositionOfCentre, draw.PositionOfCentre) == false

IS57DisplaySettings ** IS57Draw::DisplaySettings [get, inherited]

The display settings control the symbolisation (drawing style) and what types of object are drawn or excluded from the drawing.

IS57DisplaySettings * IS57Draw::DisplaySettings [set, inherited]

The display settings control the symbolisation (drawing style) and what types of object are drawn or excluded from the drawing.

DOUBLE* IS57Draw::PixelSizeMetres [get, inherited]

The nominal size of a pixel.

The approximate distance on the ground can be obtained from PixelSizeMetres * IGeoPix::DisplayScale().

DOUBLE IS57Draw::PixelSizeMetres [set, inherited]

The nominal size of a pixel.

The approximate distance on the ground can be obtained from PixelSizeMetres * IGeoPix::DisplayScale().

DOUBLE* IS57Draw::DirectionOfUp [get, inherited]

The geographical orientation of the drawing surface.

IGeoRect ** IS57Draw::GeoExtent [get, inherited]

The geographical rectangle of the drawing surface.

The result returned is a snapshot of the extent rather than a live reference to the internal state of the S57Draw object. in .NET ReferenceEquals(draw.GeoExtent, draw.GeoExtent) == false

IDisplayPalette ** IS57Draw::DisplayPalette [get, inherited]

The colour scheme for the chart. Use to draw the chart with lower luminance for twilight and night viewing.

IDisplayPalette * IS57Draw::DisplayPalette [set, inherited]

The colour scheme for the chart. Use to draw the chart with lower luminance for twilight and night viewing.

VARIANT_BOOL* IS57Draw::ShowPreviousCells [get, inherited]

Draw the S-57 cells using the previous updates. Off by default.

Change to true to draw each cell as it was before that cell was last updated.

VARIANT_BOOL IS57Draw::ShowPreviousCells [set, inherited]

Draw the S-57 cells using the previous updates. Off by default.

Change to true to draw each cell as it was before that cell was last updated.