henc · User-defined
User-defined color, image, symbol storage and symbol layer
hencGetUserColor
Section titled “hencGetUserColor”Prototype
Section titled “Prototype”COLORREF hencGetUserColor( EEncColor eco )Function
Section titled “Function”Obtain the RGB value corresponding to the S-52 color code in the user’s color table.
Parameters
Section titled “Parameters”EEncColor eco : IN (S-52 color code value)
Return Value
Section titled “Return Value”RGB color value
hencSetUserColor
Section titled “hencSetUserColor”Prototype
Section titled “Prototype”void hencSetUserColor( EEncColor eco, COLORREF co )Function
Section titled “Function”Set the RGB value corresponding to the S-52 color code in the user’s color table.
Parameters
Section titled “Parameters”- EEncColor eco : IN (S-52 Color code)
- COLORREF co : IN (RGB color)
Return Value
Section titled “Return Value”None
hencResetUserColor
Section titled “hencResetUserColor”Prototype
Section titled “Prototype”void hencResetUserColor()Function
Section titled “Function”Set all color values in the custom palette to the standard day color palette
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”None
hencUserImageNew
Section titled “hencUserImageNew”Prototype
Section titled “Prototype”CEncUserImage *hencUserImageNew( const char *fnBmp )Function
Section titled “Function”Creates an image from an image file.
Parameters
Section titled “Parameters”const char * fnBmp : IN (Image file name)
Return Value
Section titled “Return Value”- != NULL : Image Object
- == NULL : Read Fail
hencUserImageDelete
Section titled “hencUserImageDelete”Prototype
Section titled “Prototype”int hencUserImageDelete( CEncUserImage * hui )Function
Section titled “Function”Releases the memory of the image object.
Parameters
Section titled “Parameters”- It must be a value generated by the function.
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencUserImageDrawAtMapPos
Section titled “hencUserImageDrawAtMapPos”Prototype
Section titled “Prototype”int hencUserImageDrawAtMapPos( CEncUserImage * hui, double x, double y, double angle = 0, double scale = 1.0)Function
Section titled “Function”Draw an image object on the map’s top coordinate.
Parameters
Section titled “Parameters”- CEncUserImage * hui : IN (Image Object)
- It must be a value generated by the function.
- double x : IN (longitude, degree)
- double y : IN (latitude, degree)
- double angle : IN (Rotation angle, CW, degree)
- double scale : IN (Zoom scale)
Return Value
Section titled “Return Value”hencUserImageDrawAtGlPos
Section titled “hencUserImageDrawAtGlPos”Prototype
Section titled “Prototype”int hencUserImageDrawAtGlPos( CEncUserImage * hui, double x, double y, double z = 0, double angle = 0, double scale = 1)Function
Section titled “Function”- Specifies z-coordinate
Parameters
Section titled “Parameters”- CEncUserImage * hui : IN (Image Object)
- It must be a value generated by the function.
- double x : IN (GlPos)
- double y : IN (GlPos)
- double z : IN (GlPos)
- double angle : IN (Rotation angle, CW, degree)
- double scale : IN (Zoom scale)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencUsersymbolInit
Section titled “hencUsersymbolInit”Prototype
Section titled “Prototype”int hencUsersymbolInit()Function
Section titled “Function”- Initialize a user-defined symbol.
- Load previously registered user defined symbols into memory.
- There is no need to call it separately because it is called automatically in the library.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencUsersymbolClear
Section titled “hencUsersymbolClear”Prototype
Section titled “Prototype”void hencUsersymbolClear()Function
Section titled “Function”- Releases the memory occupied by the user-defined symbol.
- There is no need to call it separately because it is called automatically in the library.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”None
hencUsersymbolDel
Section titled “hencUsersymbolDel”Prototype
Section titled “Prototype”int hencUsersymbolDel( const char *name )Function
Section titled “Function”Delete the user-defined symbol corresponding to the name. At this time, the image file of the directory storing the user-defined symbol is also deleted.
Parameters
Section titled “Parameters”const char * name : IN (Object name, Null-terminated string)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
Prototype
Section titled “Prototype”int hencUsersymbolDel( CEncUserImage *img )Function
Section titled “Function”Delete the user-defined symbol corresponding to the object pointer. At this time, the image file of the directory storing the custom symbol is also deleted.
Parameters
Section titled “Parameters”CEncUserImage * img : IN (Pointer of user-defined symbol)
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencUsersymbolAddNewImage
Section titled “hencUsersymbolAddNewImage”Prototype
Section titled “Prototype”int hencUsersymbolAddNewImage( CEncUserImage *imgNew, const char *fname)Function
Section titled “Function”- Register a user-defined symbol.
- The file can be saved as an image in PNG format in the directory where user defined symbols are stored, and can be used at the next execution.
Parameters
Section titled “Parameters”- CEncUserImage *imgNew : IN (User-defined image objects)
- After registering, the library manages the memory directly, so you should not delete or free the memory.
- const char *name : IN (The name of the custom image object., Null-terminated string)
- Must be a suitable string as a file name.
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencUsersymbolAddToMap
Section titled “hencUsersymbolAddToMap”Prototype
Section titled “Prototype”int hencUsersymbolAddToMap( CEncUserImage *imgNew, const char *name )Function
Section titled “Function”- Temporarily register with user symbols.
- In this case, the file is not stored in the user-defined symbol storage directory. Therefore, it can be used only at the time of this execution, and can not be used at the next execution.
Parameters
Section titled “Parameters”- CEncUserImage *imgNew : IN (User-defined image object)
- After registering, the library manages the memory directly, so you should not delete or free the memory.
- const char *name : IN (Name of user-defined image object, Null-terminated string)
- Must be a suitable string as a file name
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencUsersymbolGetCount
Section titled “hencUsersymbolGetCount”Prototype
Section titled “Prototype”int hencUsersymbolGetCount()Function
Section titled “Function”The number of registered user defined symbols is obtained.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”The number of registered user defined symbols
hencUsersymbolGetName
Section titled “hencUsersymbolGetName”Prototype
Section titled “Prototype”const char * hencUsersymbolGetName( int no )Function
Section titled “Function”- Obtains the name from the number of registered user-defined symbols.
- The number of the user-defined symbol may be changed when a new symbol is registered or deleted, so the name according to the number must be checked each time.
Parameters
Section titled “Parameters”int no : IN (Symbol number)
Return Value
Section titled “Return Value”- != NULL : The name of the user-defined image object. (Null-terminated string)
- == NULL : Fail (Incorrect symbol number)
Prototype
Section titled “Prototype”const char * hencUsersymbolGetName( CEncUserImage *img )Function
Section titled “Function”Obtain the symbol name of the object.
Parameters
Section titled “Parameters”CEncUserImage *img : IN (Pointer of Image Object)
Return Value
Section titled “Return Value”- != NULL : The name of the user-defined image object.
- == NULL : Fail (Incorrect symbol number)
hencUsersymbolGetImage
Section titled “hencUsersymbolGetImage”Prototype
Section titled “Prototype”CEncUserImage * hencUsersymbolGetImage( int no )Function
Section titled “Function”- The name is obtained from the number of registered user-defined symbols.
- The number of the user-defined symbol may be changed when a new symbol is registered or deleted, so the name according to the number must be checked each time.
Parameters
Section titled “Parameters”int no : IN (심볼 번호)
Return Value
Section titled “Return Value”- != NULL : Image Object
- Since the library is an object that manages memory directly, it should not be deleted or freed.
- == NULL : Fail (Incorrect symbol number)
Prototype
Section titled “Prototype”CEncUserImage *hencUsersymbolGetImage( const char *name )Function
Section titled “Function”- Obtain an object from the name of the user-defined symbol.
- Since the library is an object that manages memory directly, it should not be deleted or freed.
Parameters
Section titled “Parameters”const char *name : IN (Object name, Null-terminated string)
Return Value
Section titled “Return Value”- != NULL : Success (Object pointer)
- == NULL : Fail (Not existed object)
hencUserobjAdd
Section titled “hencUserobjAdd”Prototype
Section titled “Prototype”CEncUserObject * hencUserobjAdd( double x, double y, LPCTSTR name )Function
Section titled “Function”Add a user symbol on the map.
Parameters
Section titled “Parameters”- double x : IN (longitude, degree)
- double y : IN (latitude, degree)
- const char *name : IN (The name of the symbol registered in the user symbol repository., Null-terminated string)
Return Value
Section titled “Return Value”- != NULL : Pointer value of a user defined object
- This object is managed by the library and should not be deleted or freed manually
- == NULL : Fail
Prototype
Section titled “Prototype”CEncUserObject * hencUserobjAdd( double x, double y, CEncUserImage *img )Function
Section titled “Function”- Adds a user-loaded image to the map.
- If the image is not registered in the user defined symbol repository, it is not saved at the end of the program because it has no name. Therefore, the next execution will not be restored on the map.
Parameters
Section titled “Parameters”- double x : IN (longitude, degree)
- double y : IN (latitude, degree)
- CEncUserImage *img : IN (Image object pointer)
Return Value
Section titled “Return Value”- != NULL : Pointer value of a user defined object
- This object is managed by the library and should not be deleted or freed manually
- == NULL : Fail
hencUserobjDel
Section titled “hencUserobjDel”Prototype
Section titled “Prototype”int hencUserobjDel( CEncUserObject *obj )Function
Section titled “Function”Delete user symbols on the map. Delete the object using the object pointer obtained when creating the object.
Parameters
Section titled “Parameters”CEncUserObject *obj : IN (object pointer obtained when creating the object.)
Return Value
Section titled “Return Value”-
= 0 : Success (Number of deleted userobj)
- < 0 : Fail
Prototype
Section titled “Prototype”int hencUserobjDel( CEncUserImage *obj )Function
Section titled “Function”Delete user symbols on the map. Deletes symbols at all positions using the image object of the same symbol.
Parameters
Section titled “Parameters”CEncUserImage *obj : IN (User symbol image object)
Return Value
Section titled “Return Value”-
= 0 : Success (Number of deleted userobj)
- < 0 : Fail
Prototype
Section titled “Prototype”int hencUserobjDel( double x, double y, LPCTSTR name )Function
Section titled “Function”Deletes the user-defined symbol with the specified location and the specified name.
Parameters
Section titled “Parameters”- double x : IN (longitude, degree)
- double y : IN (latitude, degree)
- const LPCTSTR : IN (The name of the symbol registered in the symbol repository, Null-terminated string)
Return Value
Section titled “Return Value”-
= 0 : Success (Number of deleted userobj)
- < 0 : Fail
Prototype
Section titled “Prototype”int hencUserobjDel( const char *name )Function
Section titled “Function”Delete user symbols on the map. Deletes symbols at all positions using symbol image objects of the same name.
Parameters
Section titled “Parameters”const char *name : IN (The name of the symbol registered in the symbol repository, Null-terminated string)
Return Value
Section titled “Return Value”-
= 0 : Success (Number of deleted userobj)
- < 0 : Fail
Prototype
Section titled “Prototype”int hencUserobjDel( double x, double y )Function
Section titled “Function”Delete all user-defined symbols at the specified location on the map.
Parameters
Section titled “Parameters”- double x : IN (longitude, degree)
- double y : IN (latitude, degree)
Return Value
Section titled “Return Value”-
= 0 : Success (Number of deleted userobj)
- < 0 : Fail
hencUserobjGet
Section titled “hencUserobjGet”Prototype
Section titled “Prototype”CEncUserObject * hencUserobjGet( int no )Function
Section titled “Function”Returns the object of the no-th user defined symbol.
Parameters
Section titled “Parameters”int no : IN (User object number)
Return Value
Section titled “Return Value”- != NULL : Pointer value of user-defined object
- This object is managed by the library and should not be deleted or freed manually
- == NULL : Fail
hencUserobjGetCount
Section titled “hencUserobjGetCount”Prototype
Section titled “Prototype”int hencUserobjGetCount()Function
Section titled “Function”Returns the number of registered user defined symbols.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”Number of user-defined symbols