1 /*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2004-2006 - INRIA - Fabrice Leray
4 * Copyright (C) 2006 - INRIA - Allan Cornet
5 * Copyright (C) 2006 - INRIA - Jean-Baptiste Silvy
6 * Copyright (C) 2010 - DIGITEO - Manuel Juliachs
7 * Copyright (C) 2011 - DIGITEO - Vincent Couvert
8 *
9 * Copyright (C) 2012 - 2016 - Scilab Enterprises
10 *
11 * This file is hereby licensed under the terms of the GNU GPL v2.0,
12 * pursuant to article 5.3.4 of the CeCILL v.2.1.
13 * This file was originally licensed under the terms of the CeCILL v2.1,
14 * and continues to be available under such terms.
15 * For more information, see the COPYING file which you should have received
16 * along with this program.
17 *
18 */
19
20 /*------------------------------------------------------------------------*/
21 /* file: get_font_size_property.c */
22 /* desc : function to retrieve in Scilab the font_size field of a */
23 /* handle */
24 /*------------------------------------------------------------------------*/
25
26 #include "getHandleProperty.h"
27 #include "GetProperty.h"
28 #include "returnProperty.h"
29 #include "Scierror.h"
30 #include "localization.h"
31
32 #include "getGraphicObjectProperty.h"
33 #include "graphicObjectProperties.h"
34
35 /*------------------------------------------------------------------------*/
get_font_size_property(void * _pvCtx,int iObjUID)36 void* get_font_size_property(void* _pvCtx, int iObjUID)
37 {
38 double dblFontSize = 0;
39 double* pdblFontSize = &dblFontSize;
40
41 getGraphicObjectProperty(iObjUID, __GO_FONT_SIZE__, jni_double, (void **)&pdblFontSize);
42
43 if (pdblFontSize == NULL)
44 {
45 Scierror(999, _("'%s' property does not exist for this handle.\n"), "font_size");
46 return NULL;
47 }
48
49 return sciReturnDouble(dblFontSize);
50 }
51 /*------------------------------------------------------------------------*/
52