/*------------------------------------------------------------------------*/ int get_font_foreground_property(char *pobjUID) { int iFontColor = 0; int* fontColor = &iFontColor; getGraphicObjectProperty(pobjUID, __GO_FONT_COLOR__, jni_int, &fontColor); if (fontColor == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"),"font_foreground"); return -1; } return sciReturnInt(*fontColor); /* To be implemented later since it involves color range checks */ #if 0 return sciReturnInt( sciGetFontForegroundToDisplay( pobj ) ); #endif }
/*------------------------------------------------------------------------*/ int get_figure_id_property(char *pobjUID) { int iFigureId = 0; int *piFigureId = &iFigureId; getGraphicObjectProperty(pobjUID, __GO_ID__, jni_int, &piFigureId); if ( piFigureId == NULL ) { Scierror(999, _("'%s' property does not exist for this handle.\n"),"figure_id"); return -1; } return sciReturnInt(iFigureId); }
/** * Get the datatip orientation. */ void* get_tip_orientation_property(void* _pvCtx, int iObjUID) { int tip_orientation; int *piTipOrientation = &tip_orientation; getGraphicObjectProperty(iObjUID, __GO_DATATIP_ORIENTATION__, jni_int, (void **)&piTipOrientation); if (piTipOrientation == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "orientation"); return NULL; } return sciReturnInt(tip_orientation); }
/*------------------------------------------------------------------------*/ int get_hidden_axis_color_property(void* _pvCtx, char* pobjUID) { int iHiddenAxisColor = 0; int* piHiddenAxisColor = &iHiddenAxisColor; getGraphicObjectProperty(pobjUID, __GO_HIDDEN_AXIS_COLOR__, jni_int, (void **)&piHiddenAxisColor); if (piHiddenAxisColor == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "hidden_axis_color"); return -1; } return sciReturnInt(_pvCtx, iHiddenAxisColor); }