henc · Display Environment
Layer / visibility / pixel / symbol scale / Mercator / depth / color / font display settings
hencGetMapLevelMask
Section titled “hencGetMapLevelMask”Prototype
Section titled “Prototype”DWORD hencGetMapLevelMask()Function
Section titled “Function”- The ENC map has six map levels. This function obtains a flag value indicating whether or not the current map is displayed for each level. That is, the display setting value for each level is obtained.
- For each level, the bit values of LSBs 0 to 5 correspond to 1 to 6 S-57 codes. Depending on the value of each bit, the corresponding level is not displayed or displayed on the screen.
- 0 : not display, 1: display
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Bit Mask per each level
hencSetMapLevelMask
Section titled “hencSetMapLevelMask”Prototype
Section titled “Prototype”void hencSetMapLevelMask( DWORD mask )Function
Section titled “Function”- This function sets whether to display the map by level. Whether or not to set an display for each map level is specified in the form of a bit mask.
- For each level, the bit values of LSBs 0 to 5 correspond to 1 to 6 S-57 codes. Depending on the value of each bit, the level does not display or display the map on the screen.
- If it is 0, it is not displayed. If it is 1, it is displayed.
Parameters
Section titled “Parameters”- Levels 0 ~ 5 correspond to S-57 Code 1 ~ 6 and decide whether each map is displayed or not.
Return Value
Section titled “Return Value”None
Remarks
Section titled “Remarks”- When the electronic chart is loaded, the level value is set to the value of L when the file name of the map cell is xxLxxxxx.xxx. This value can be set from 1 to 6 as S-57 code value. The internally stored level value is set to one less than the S-57 code value.
- (Ex) Level 0 = S-57 Code 1
- If the level value can not be checked, set it to “0”.
- Level 10 is treated separately as a top level, and is drawn at the top level of all maps.
- You can change the level value of the map with the result of the function.
hencEncfileGetVisible
Section titled “hencEncfileGetVisible”Prototype
Section titled “Prototype”int hencEncfileGetVisible( int no )Function
Section titled “Function”Checke whether the display is set for each map cell.
Parameters
Section titled “Parameters”int no : IN (Map number)
Return Value
Section titled “Return Value”-
0 : Display
- == 0 : Not display
- < 0 : Fail (Map number error)
Remarks
Section titled “Remarks”- See “Map File I / O” for details.
hencEncfileSetVisible
Section titled “hencEncfileSetVisible”Prototype
Section titled “Prototype”int hencEncfileSetVisible( int no, int isShow )Function
Section titled “Function”- If the flag is 0, the map cell is hidden from view on the screen.
Parameters
Section titled “Parameters”- int no : IN (Map number)
- int isShow : IN (0 : Not display, 1 : Display)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencEncfileSetLevel
Section titled “hencEncfileSetLevel”Prototype
Section titled “Prototype”int hencEncfileSetLevel( int no, int level )Function
Section titled “Function”- Change the level of the individual map file.
- When loading each map, the display level is determined according to the S-57 code value included in the file name.
- If the upper level (the higher the number) is overlapped with the lower level map, the upper level map will cover the lower level map.
Parameters
Section titled “Parameters”- int no : IN (Map number)
- int level : IN (Map level, 0~5 or available up to 10)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencEncfileGetLevel
Section titled “hencEncfileGetLevel”Prototype
Section titled “Prototype”int hencEncfileGetLevel( int no )Function
Section titled “Function”Obtain the currently configured level value of the map file (Map File).
Parameters
Section titled “Parameters”int no : IN (Map number)
Return Value
Section titled “Return Value”- 0~5 or 10 : Success (Level value)
- < 0 : Fail
hencEncfileSetBottom
Section titled “hencEncfileSetBottom”Prototype
Section titled “Prototype”int hencEncfileSetBottom( int no )Function
Section titled “Function”Set a specific map cell to level 0 so that it is drawn on the lower layer of another map on the screen.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencEncfileSetTopMost
Section titled “hencEncfileSetTopMost”Prototype
Section titled “Prototype”int hencEncfileSetTopMost( int no )Function
Section titled “Function”Designate a specific map cell at level 10 so that it is drawn on the upper layer of another map on the screen.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success.
- < 0 : Fail
hencEncfileSetScaleForTopmost
Section titled “hencEncfileSetScaleForTopmost”Prototype
Section titled “Prototype”int hencEncfileSetScaleForTopmost( int scale )Function
Section titled “Function”- That is, this can be applied to a purpose of using a map that is additionally overlayed on an existing electronic chart.
Parameters
Section titled “Parameters”- 0 : Always display
-
0 : Display when N value is lower than scale on 1:N scale
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencSetObjMask
Section titled “hencSetObjMask”Prototype
Section titled “Prototype”int hencSetObjMask( EEncObject obj, bool flag )Function
Section titled “Function”Specifies whether to display the ENC Feature Object by type.
Parameters
Section titled “Parameters”- EEncObject obj : IN (ENC Feature Object Code)
- Refer the chapter 2.23.1 S-57 Feature Object Catalog< in API reference manual/li>
- bool flag : IN
- true : Display
- false : Do not display
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGetObjMask
Section titled “hencGetObjMask”Prototype
Section titled “Prototype”bool hencGetObjMask( EEncObject obj )Function
Section titled “Function”Obtains the display mask of each ENC Feature Object.
Parameters
Section titled “Parameters”- Refer S-57 Feature Object Catalog in chapter 2.23.1 in API reference manual
Return Value
Section titled “Return Value”- true : Display
- false : Not display
hencSetPixelSize
Section titled “hencSetPixelSize”Prototype
Section titled “Prototype”int hencSetPixelSize( double meter )Function
Section titled “Function”- Specifies the size of the screen pixels used to scale the map. (Unit : Meter)
- It is interlocked with the function, and only the units are different.
Parameters
Section titled “Parameters”double meter : IN (1 pixel size of screen기, meter)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
Remarks
Section titled “Remarks”Default setting : 0.000265 ~= 96DPI
hencSetPixelDPI
Section titled “hencSetPixelDPI”Prototype
Section titled “Prototype”int hencSetPixelDPI( int dpi )Function
Section titled “Function”- Specifies the size of the screen pixels used to scale the map. (Unit : Number of pixels, DPI)
- It is interlocked with function and there is only difference in unit.
Parameters
Section titled “Parameters”int dpi : IN (Pixels per inch of screen, DPI)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
Remarks
Section titled “Remarks”Default setting : 0.000265 ~= 96DPI
hencGetPixelSize
Section titled “hencGetPixelSize”Prototype
Section titled “Prototype”double hencGetPixelSize()Function
Section titled “Function”It converts the size value of 1 pixel of the screen into metric unit and returns it.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Size value corresponding to 1 pixel of the screen (meter unit)
Remarks
Section titled “Remarks”Default setting : 0.000265 ~= 96DPI
hencGetPixelDPI
Section titled “hencGetPixelDPI”Prototype
Section titled “Prototype”int hencGetPixelDPI()Function
Section titled “Function”Converts the size value of 1 pixel of the screen into DPI unit and returns it.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Screen DPI value
Remarks
Section titled “Remarks”Default setting : 0.000265 ~= 96DPI
hencGetSymbolScale
Section titled “hencGetSymbolScale”Prototype
Section titled “Prototype”double hencGetSymbolScale()Function
Section titled “Function”Obtains the size values of S-52 Symbol, Pattern, Line and so on.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Symbol scale value
hencSetSymbolScale
Section titled “hencSetSymbolScale”Prototype
Section titled “Prototype”int hencSetSymbolScale( double scale )Function
Section titled “Function”Specify the size value of the S-52’s Symbol, Pattern, Line, and so on. Depending on the ratio of these values, each symbol, pattern, and line change at the same rate.
Parameters
Section titled “Parameters”double scale : IN (Symbol Scale)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
Remarks
Section titled “Remarks”Default setting : 0.033333 ~= 96DPI
hencIsAutoScaleToZoom
Section titled “hencIsAutoScaleToZoom”Prototype
Section titled “Prototype”bool hencIsAutoScaleToZoom()Function
Section titled “Function”Confirm whether you are using the automatic magnification adjustment function when changing the latitude.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- true : Use auto scaling
- false : Do not use auto scaling
hencSetAutoScaleToZoom
Section titled “hencSetAutoScaleToZoom”Prototype
Section titled “Prototype”int hencSetAutoScaleToZoom( bool flag )Function
Section titled “Function”Confirm whether you are using the automatic magnification adjustment function when changing the latitude.
Parameters
Section titled “Parameters”- true : Use auto scaling
- false : Do not use auto scaling
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencIsMercator
Section titled “hencIsMercator”Prototype
Section titled “Prototype”bool hencIsMercator()Function
Section titled “Function”Check whether Mercator projection is used.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- true : Use Mercator projection
- false : Do not use Mercator projection
hencSetMercator
Section titled “hencSetMercator”Prototype
Section titled “Prototype”void hencSetMercator( bool flag )Function
Section titled “Function”Specifies whether to use the Mercator projection.
Parameters
Section titled “Parameters”- true : Use Mercator projection
- false : Do not use Mercator projection
Return Value
Section titled “Return Value”None
hencSetSimplifiedSymbol
Section titled “hencSetSimplifiedSymbol”Prototype
Section titled “Prototype”void hencSetSimplifiedSymbol( bool flag )Function
Section titled “Function”Specifies whether Simpilfied Symbol should be used when displaying S-52 symbols, patterns, and lines.
Parameters
Section titled “Parameters”- true : Use simpilfied symbol, pattern and line
- false : Do not use simpilfied symbol, pattern and line
Return Value
Section titled “Return Value”None
hencIsSimplifiedSymbol
Section titled “hencIsSimplifiedSymbol”Prototype
Section titled “Prototype”bool hencIsSimplifiedSymbol()Function
Section titled “Function”Check whether Simpilfied Symbol is used when displaying S-52 symbols, patterns and lines.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- true : Use simpilfied Symbols, Patterns, and Lines
- false : Do not use simpilfied Symbols, Patterns, and Lines
hencGetDisplayCategory
Section titled “hencGetDisplayCategory”Prototype
Section titled “Prototype”EDisplayCategory hencGetDisplayCategory()Function
Section titled “Function”Obtain display category.(Refer S-52 Display Category in chapter 2.23.5 in API reference manual)
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Current setting of EDisplayCategory
hencSetDisplayCategory
Section titled “hencSetDisplayCategory”Prototype
Section titled “Prototype”void hencSetDisplayCategory( EDisplayCategory c )Function
Section titled “Function”Specify the display category.(Refer chapter 2.23.5 in API reference manual.)
Parameters
Section titled “Parameters”EDisplayCategory c : IN (EDisplayCategory setting value)
Return Value
Section titled “Return Value”None
hencSetNationalLanguage
Section titled “hencSetNationalLanguage”Prototype
Section titled “Prototype”void hencSetNationalLanguage( bool flag )Function
Section titled “Function”- Specifies whether to use the local language in the ENC file.
- When displaying the information of each ENC Feature Object, it specifies whether to use the local language information if it contains the local language information. When disabled, it is always displayed in English.
Parameters
Section titled “Parameters”- true : Use local language
- false : Use English only
Return Value
Section titled “Return Value”None
hencIsNationalLanguage
Section titled “hencIsNationalLanguage”Prototype
Section titled “Prototype”bool hencIsNationalLanguage()Function
Section titled “Function”Check whether the local language is used in the ENC file.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- true : Use local language
- false : English only
hencGetUseScaleMinMax
Section titled “hencGetUseScaleMinMax”Prototype
Section titled “Prototype”int hencGetUseScaleMinMax()Function
Section titled “Function”Check whether SCAMIN and SCAMAX values are used in the ENC Feature Object.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- != 0 : In use
- ==0 : Not use
- < 0 : Fail
hencSetUseScaleMinMax
Section titled “hencSetUseScaleMinMax”Prototype
Section titled “Prototype”void hencSetUseScaleMinMax( int flag )Function
Section titled “Function”Specifies whether to use the SCAMIN, SCAMAX values within the ENC Feature Object to display.
Parameters
Section titled “Parameters”- != 0 : Use
- ==0 : Do not use
Return Value
Section titled “Return Value”None
hencGetViewMapByScale
Section titled “hencGetViewMapByScale”Prototype
Section titled “Prototype”int hencGetViewMapByScale()Function
Section titled “Function”Obtains using status of the function which determines whether to display according to the level when display map.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- != 0 : In use
- ==0 : Not use
- < 0 : Fail
hencSetViewMapByScale
Section titled “hencSetViewMapByScale”Prototype
Section titled “Prototype”void hencSetViewMapByScale( int flag )Function
Section titled “Function”Set whether or not to use the function to decide whether to display or not according to the level when displaying the map. Below the specified scale, set the function to hide the detail map on the screen.
Parameters
Section titled “Parameters”- != 0 : Use
- ==0 : Do not use
Return Value
Section titled “Return Value”None
hencSetDepth
Section titled “hencSetDepth”Prototype
Section titled “Prototype”int hencSetDepth( EDepthType t, double depth )Function
Section titled “Function”Change the setting value that shows the currently set water depth. S-52 Sets water depth value used for color and line segment display by depth defined in CSP.
Parameters
Section titled “Parameters”- EDepthType t: IN (Depth type)
- double depth : IN (depth value, meter)
Return Value
Section titled “Return Value”-
= 0 : Success
- < 0 : Fail
hencGetDepth
Section titled “hencGetDepth”Prototype
Section titled “Prototype”double hencGetDepth( EDepthType t );Function
Section titled “Function”- Obtains the setting value for the currently configured water depth display.
- Refer function for the details
Parameters
Section titled “Parameters”EDepthType t : IN (Water depth type) enum EDepthType { SHALLOW_CONTOUR, DEEP_CONTOUR, SAFETY_CONTOUR, SAFETY_DEPTH, DEPTHTYPE_MAX };
Return Value
Section titled “Return Value”Current setting
hencSetShallowPattern
Section titled “hencSetShallowPattern”Prototype
Section titled “Prototype”int hencSetShallowPattern( bool flag )Function
Section titled “Function”Set whether or not to display a shallow depth pattern (shallow pattern) for displaying the shallow water depth.
Parameters
Section titled “Parameters”- true : Display shallow pattern
- false : Do not display shallow pattern
Return Value
Section titled “Return Value”-
= 0 : Success
- < 0 : Fail
hencIsShallowPattern
Section titled “hencIsShallowPattern”Prototype
Section titled “Prototype”bool hencIsShallowPattern()Function
Section titled “Function”Obtains setting value of whether to display of the low-water depth pattern (Shallow pattern) for displaying the shallow water depth.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Setting value of whether to display of the low-water depth pattern
hencSetTwoShades
Section titled “hencSetTwoShades”Prototype
Section titled “Prototype”int hencSetTwoShades( bool flag )Function
Section titled “Function”- Set whether to use only two colors when displaying the depth of sea level area.
- The sea level is represented by two colors or four different colors, depending on the depth of the water. Specify the number of colors to use at this time.
Parameters
Section titled “Parameters”- true : Use two colors only
- false : Use more than 2 colors
Return Value
Section titled “Return Value”-
= 0 : Success
- < 0 : Fail
hencIsTwoShades
Section titled “hencIsTwoShades”Prototype
Section titled “Prototype”bool hencIsTwoShades()Function
Section titled “Function”Obtain whether to use two colors mode when displaying sea level.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”1 : Use two colors mode 0 : Do not use two colors mode(4 colors are used)
hencSetHideMeta
Section titled “hencSetHideMeta”Prototype
Section titled “Prototype”int hencSetHideMeta( bool flag )Function
Section titled “Function”Sets whether to display the object corresponding to the Meta Object(300th Object Code) among the Feature Objects of the S-57 ENC.
Parameters
Section titled “Parameters”- true : Do not display meta-objects
- false : Display meta-objects
Return Value
Section titled “Return Value”-
= 0 : Success
- < 0 : Fail
hencIsHideMeta
Section titled “hencIsHideMeta”Prototype
Section titled “Prototype”bool hencIsHideMeta()Function
Section titled “Function”Obtain the display setting value of the meta-object.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Whether the meta-object is displayed
hencSetColorset
Section titled “hencSetColorset”Prototype
Section titled “Prototype”int hencSetColorset( EEncColorset colorset )Function
Section titled “Function”Specify the color of the map display. (Refer S-52 Color)
Parameters
Section titled “Parameters”EEncColorset colorset : IN (Value of color table) enum EEncColorset { COLORSET_DAY_BRIGHT, COLORSET_DAY_WHITEBACK, COLORSET_DAY_BLACKBACK, COLORSET_DUSK, COLORSET_NIGHT, COLORSET_USER, COLORSET_MAX };
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencGetColorset
Section titled “hencGetColorset”Prototype
Section titled “Prototype”EEncColorset hencGetColorset()Function
Section titled “Function”Obtain the map display color table value in use. (Refer S-52 Color)
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Map display color table value in use. enum EEncColorset { COLORSET_DAY_BRIGHT, COLORSET_DAY_WHITEBACK, COLORSET_DAY_BLACKBACK, COLORSET_DUSK, COLORSET_NIGHT, COLORSET_USER, COLORSET_MAX };
hencFontGet
Section titled “hencFontGet”Prototype
Section titled “Prototype”int hencFontGet( LOGFONT *lf )Function
Section titled “Function”Obtain the setting value for the font to be used for map display.
Parameters
Section titled “Parameters”LOGFONT *lf : IN, OUT (Win32 LOGFONT structure)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencFontSet
Section titled “hencFontSet”Prototype
Section titled “Prototype”int hencFontSet( LOGFONT *lf )Function
Section titled “Function”Specify the setting value of the font to be used for map display.
Parameters
Section titled “Parameters”LOGFONT *lf : IN (Win32 LOGFONT structure)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencPrintf
Section titled “hencPrintf”Prototype
Section titled “Prototype”int hencPrintf( double x, double y, COLORREF co, const char *fmt, ... )Function
Section titled “Function”- Draws a string with the color specified in the specified coordinates in the same font as the font used for map display.
- This function has a formatting functionality like printf of C language.
Parameters
Section titled “Parameters”- double x : IN (OpenGL x coordinate value to display text)
- double y : IN (OpenGL y coordinate value to display text)
- COLORREF co : IN (Text color)
- const char *fmt : IN (String to display on screen, Null-terminated string)
- See the printf format specification of C language.
Return Value
Section titled “Return Value”-
= 0 : Success
- < 0 : Fail
Prototype
Section titled “Prototype”int hencPrintf( double x, double y, double z, COLORREF co, const char *fmt, ... )Function
Section titled “Function”- Draws a string with the color specified in the specified coordinates in the same font as the font used for map display. (including z-coordinate)
- This function has a formatting functionality like printf of C language.
Parameters
Section titled “Parameters”- double x : IN (OpenGL x coordinate value to display tex)
- double y : IN (OpenGL y coordinate value to display tex)
- double z : IN (OpenGL z coordinate value to display tex값)
- COLORREF co : IN (Text color)
- const char *fmt : IN (String to display on screen, Null-terminated string)
- See the printf format specification of C language.
Return Value
Section titled “Return Value”-
= 0 : Success
- < 0 : Fail