/* Private function prototypes. */
/*========================================================*/
-static void gl_label_barcode_class_init (glLabelBarcodeClass *klass);
-static void gl_label_barcode_instance_init (glLabelBarcode *lbc);
-static void gl_label_barcode_finalize (GObject *object);
+static void gl_label_barcode_class_init (glLabelBarcodeClass *klass);
+static void gl_label_barcode_instance_init (glLabelBarcode *lbc);
+static void gl_label_barcode_finalize (GObject *object);
-static void copy (glLabelObject *dst_object,
- glLabelObject *src_object);
+static void copy (glLabelObject *dst_object,
+ glLabelObject *src_object);
-static void get_size (glLabelObject *object,
- gdouble *w,
- gdouble *h);
+static void get_size (glLabelObject *object,
+ gdouble *w,
+ gdouble *h);
-static void set_line_color (glLabelObject *object,
- guint line_color);
+static void set_line_color (glLabelObject *object,
+ guint line_color);
+
+static guint get_line_color (glLabelObject *object);
\f
label_object_class->copy = copy;
label_object_class->get_size = get_size;
label_object_class->set_line_color = set_line_color;
+ label_object_class->get_line_color = get_line_color;
object_class->finalize = gl_label_barcode_finalize;
}
gboolean text_flag;
gboolean checksum_flag;
guint color;
- gdouble scale;
gl_debug (DEBUG_LABEL, "START");
g_return_if_fail (new_lbc && GL_IS_LABEL_BARCODE (new_lbc));
text_node = gl_label_barcode_get_data (lbc);
- gl_label_barcode_get_props (lbc, &style, &text_flag, &checksum_flag, &color);
+ gl_label_barcode_get_props (lbc, &style, &text_flag, &checksum_flag);
+ color = get_line_color (src_object);
gl_label_barcode_set_data (new_lbc, text_node);
- gl_label_barcode_set_props (new_lbc,style, text_flag, checksum_flag, color);
+ gl_label_barcode_set_props (new_lbc,style, text_flag, checksum_flag);
+ set_line_color (dst_object, color);
gl_text_node_free (&text_node);
gl_label_barcode_set_props (glLabelBarcode *lbc,
glBarcodeStyle style,
gboolean text_flag,
- gboolean checksum_flag,
- guint color)
+ gboolean checksum_flag)
{
gl_debug (DEBUG_LABEL, "START");
lbc->private->style = style;
lbc->private->text_flag = text_flag;
lbc->private->checksum_flag = checksum_flag;
- lbc->private->color = color;
gl_label_object_emit_changed (GL_LABEL_OBJECT(lbc));
gl_label_barcode_get_props (glLabelBarcode *lbc,
glBarcodeStyle *style,
gboolean *text_flag,
- gboolean *checksum_flag,
- guint *color)
+ gboolean *checksum_flag)
{
g_return_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc));
*style = lbc->private->style;
*text_flag = lbc->private->text_flag;
*checksum_flag = lbc->private->checksum_flag;
- *color = lbc->private->color;
}
/*---------------------------------------------------------------------------*/
}
}
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. Get line color method. */
+/*---------------------------------------------------------------------------*/
+static guint
+get_line_color (glLabelObject *object)
+{
+ glLabelBarcode *lbarcode = (glLabelBarcode *)object;
+
+ g_return_if_fail (lbarcode && GL_IS_LABEL_BARCODE (lbarcode));
+
+ return lbarcode->private->color;
+}
+
void gl_label_barcode_set_props (glLabelBarcode *lbc,
glBarcodeStyle style,
gboolean text_flag,
- gboolean checksum_flag,
- guint color);
+ gboolean checksum_flag);
glTextNode *gl_label_barcode_get_data (glLabelBarcode *lbc);
void gl_label_barcode_get_props (glLabelBarcode *lbc,
glBarcodeStyle *style,
gboolean *text_flag,
- gboolean *checksum_flag,
- guint *color);
+ gboolean *checksum_flag);
G_END_DECLS
/* Private function prototypes. */
/*========================================================*/
-static void gl_label_box_class_init (glLabelBoxClass *klass);
-static void gl_label_box_instance_init (glLabelBox *lbox);
-static void gl_label_box_finalize (GObject *object);
+static void gl_label_box_class_init (glLabelBoxClass *klass);
+static void gl_label_box_instance_init (glLabelBox *lbox);
+static void gl_label_box_finalize (GObject *object);
-static void copy (glLabelObject *dst_object,
- glLabelObject *src_object);
+static void copy (glLabelObject *dst_object,
+ glLabelObject *src_object);
-static void set_fill_color (glLabelObject *object,
- guint fill_color);
+static void set_fill_color (glLabelObject *object,
+ guint fill_color);
-static void set_line_color (glLabelObject *object,
- guint line_color);
+static void set_line_color (glLabelObject *object,
+ guint line_color);
-static void set_line_width (glLabelObject *object,
- gdouble line_width);
+static void set_line_width (glLabelObject *object,
+ gdouble line_width);
+
+static guint get_fill_color (glLabelObject *object);
+
+static guint get_line_color (glLabelObject *object);
+
+static gdouble get_line_width (glLabelObject *object);
\f
label_object_class->set_fill_color = set_fill_color;
label_object_class->set_line_color = set_line_color;
label_object_class->set_line_width = set_line_width;
+ label_object_class->get_fill_color = get_fill_color;
+ label_object_class->get_line_color = get_line_color;
+ label_object_class->get_line_width = get_line_width;
object_class->finalize = gl_label_box_finalize;
}
g_return_if_fail (lbox && GL_IS_LABEL_BOX (lbox));
g_return_if_fail (new_lbox && GL_IS_LABEL_BOX (new_lbox));
- line_width = gl_label_box_get_line_width (lbox);
- line_color = gl_label_box_get_line_color (lbox);
- fill_color = gl_label_box_get_fill_color (lbox);
+ line_width = get_line_width (src_object);
+ line_color = get_line_color (src_object);
+ fill_color = get_fill_color (src_object);
- gl_label_box_set_line_width (new_lbox, line_width);
- gl_label_box_set_line_color (new_lbox, line_color);
- gl_label_box_set_fill_color (new_lbox, fill_color);
+ set_line_width (dst_object, line_width);
+ set_line_color (dst_object, line_color);
+ set_fill_color (dst_object, fill_color);
gl_debug (DEBUG_LABEL, "END");
}
-/*****************************************************************************/
-/* Set object params. */
-/*****************************************************************************/
-void
-gl_label_box_set_line_width (glLabelBox *lbox,
- gdouble line_width)
-{
- g_return_if_fail (lbox && GL_IS_LABEL_BOX (lbox));
-
- if ( lbox->private->line_width != line_width ) {
- lbox->private->line_width = line_width;
- gl_label_object_emit_changed (GL_LABEL_OBJECT(lbox));
- }
-}
-
-void
-gl_label_box_set_line_color (glLabelBox *lbox,
- guint line_color)
-{
- g_return_if_fail (lbox && GL_IS_LABEL_BOX (lbox));
-
- if ( lbox->private->line_color != line_color ) {
- lbox->private->line_color = line_color;
- gl_label_object_emit_changed (GL_LABEL_OBJECT(lbox));
- }
-}
-
-void
-gl_label_box_set_fill_color (glLabelBox *lbox,
- guint fill_color)
-{
- g_return_if_fail (lbox && GL_IS_LABEL_BOX (lbox));
-
- if ( lbox->private->fill_color != fill_color ) {
- lbox->private->fill_color = fill_color;
- gl_label_object_emit_changed (GL_LABEL_OBJECT(lbox));
- }
-}
-
-/*****************************************************************************/
-/* Get object params. */
-/*****************************************************************************/
-gdouble
-gl_label_box_get_line_width (glLabelBox *lbox)
-{
- g_return_val_if_fail (lbox && GL_IS_LABEL_BOX (lbox), 0.0);
-
- return lbox->private->line_width;
-}
-
-guint
-gl_label_box_get_line_color (glLabelBox *lbox)
-{
- g_return_val_if_fail (lbox && GL_IS_LABEL_BOX (lbox), 0);
-
- return lbox->private->line_color;
-}
-
-guint
-gl_label_box_get_fill_color (glLabelBox *lbox)
-{
- g_return_val_if_fail (lbox && GL_IS_LABEL_BOX (lbox), 0);
-
- return lbox->private->fill_color;
-}
-
/*---------------------------------------------------------------------------*/
/* PRIVATE. Set fill color method. */
/*---------------------------------------------------------------------------*/
}
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. Get fill color method. */
+/*---------------------------------------------------------------------------*/
+static gdouble
+get_line_width (glLabelObject *object)
+{
+ glLabelBox *lbox = (glLabelBox *)object;
+
+ g_return_val_if_fail (lbox && GL_IS_LABEL_BOX (lbox), 0.0);
+
+ return lbox->private->line_width;
+}
+
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. Get line color method. */
+/*---------------------------------------------------------------------------*/
+static guint
+get_line_color (glLabelObject *object)
+{
+ glLabelBox *lbox = (glLabelBox *)object;
+
+ g_return_val_if_fail (lbox && GL_IS_LABEL_BOX (lbox), 0);
+
+ return lbox->private->line_color;
+}
+
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. Get line width method. */
+/*---------------------------------------------------------------------------*/
+static guint
+get_fill_color (glLabelObject *object)
+{
+ glLabelBox *lbox = (glLabelBox *)object;
+
+ g_return_val_if_fail (lbox && GL_IS_LABEL_BOX (lbox), 0);
+
+ return lbox->private->fill_color;
+}
+
GObject *gl_label_box_new (glLabel *label);
-void gl_label_box_set_line_width (glLabelBox *lbox,
- gdouble line_width);
-
-void gl_label_box_set_line_color (glLabelBox *lbox,
- guint line_color);
-
-void gl_label_box_set_fill_color (glLabelBox *lbox,
- guint fill_color);
-
-gdouble gl_label_box_get_line_width (glLabelBox *lbox);
-guint gl_label_box_get_line_color (glLabelBox *lbox);
-guint gl_label_box_get_fill_color (glLabelBox *lbox);
-
-
G_END_DECLS
#endif /* __LABEL_BOX_H__ */
/* Private function prototypes. */
/*========================================================*/
-static void gl_label_ellipse_class_init (glLabelEllipseClass *klass);
-static void gl_label_ellipse_instance_init (glLabelEllipse *lellipse);
-static void gl_label_ellipse_finalize (GObject *object);
+static void gl_label_ellipse_class_init (glLabelEllipseClass *klass);
+static void gl_label_ellipse_instance_init (glLabelEllipse *lellipse);
+static void gl_label_ellipse_finalize (GObject *object);
-static void copy (glLabelObject *dst_object,
- glLabelObject *src_object);
+static void copy (glLabelObject *dst_object,
+ glLabelObject *src_object);
-static void set_fill_color (glLabelObject *object,
- guint fill_color);
+static void set_fill_color (glLabelObject *object,
+ guint fill_color);
-static void set_line_color (glLabelObject *object,
- guint line_color);
+static void set_line_color (glLabelObject *object,
+ guint line_color);
-static void set_line_width (glLabelObject *object,
- gdouble line_width);
+static void set_line_width (glLabelObject *object,
+ gdouble line_width);
+
+static guint get_fill_color (glLabelObject *object);
+
+static guint get_line_color (glLabelObject *object);
+
+static gdouble get_line_width (glLabelObject *object);
\f
label_object_class->set_fill_color = set_fill_color;
label_object_class->set_line_color = set_line_color;
label_object_class->set_line_width = set_line_width;
+ label_object_class->get_fill_color = get_fill_color;
+ label_object_class->get_line_color = get_line_color;
+ label_object_class->get_line_width = get_line_width;
object_class->finalize = gl_label_ellipse_finalize;
}
g_return_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse));
g_return_if_fail (new_lellipse && GL_IS_LABEL_ELLIPSE (new_lellipse));
- line_width = gl_label_ellipse_get_line_width (lellipse);
- line_color = gl_label_ellipse_get_line_color (lellipse);
- fill_color = gl_label_ellipse_get_fill_color (lellipse);
+ line_width = get_line_width (src_object);
+ line_color = get_line_color (src_object);
+ fill_color = get_fill_color (src_object);
- gl_label_ellipse_set_line_width (new_lellipse, line_width);
- gl_label_ellipse_set_line_color (new_lellipse, line_color);
- gl_label_ellipse_set_fill_color (new_lellipse, fill_color);
+ set_line_width (dst_object, line_width);
+ set_line_color (dst_object, line_color);
+ set_fill_color (dst_object, fill_color);
gl_debug (DEBUG_LABEL, "END");
}
-/*****************************************************************************/
-/* Set object params. */
-/*****************************************************************************/
-void
-gl_label_ellipse_set_line_width (glLabelEllipse *lellipse,
- gdouble line_width)
-{
- g_return_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse));
-
- if ( lellipse->private->line_width != line_width ) {
- lellipse->private->line_width = line_width;
- gl_label_object_emit_changed (GL_LABEL_OBJECT(lellipse));
- }
-}
-
-void
-gl_label_ellipse_set_line_color (glLabelEllipse *lellipse,
- guint line_color)
-{
- g_return_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse));
-
- if ( lellipse->private->line_color != line_color ) {
- lellipse->private->line_color = line_color;
- gl_label_object_emit_changed (GL_LABEL_OBJECT(lellipse));
- }
-}
-
-void
-gl_label_ellipse_set_fill_color (glLabelEllipse *lellipse,
- guint fill_color)
-{
- g_return_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse));
-
- if ( lellipse->private->fill_color != fill_color ) {
- lellipse->private->fill_color = fill_color;
- gl_label_object_emit_changed (GL_LABEL_OBJECT(lellipse));
- }
-}
-
-/*****************************************************************************/
-/* Get object params. */
-/*****************************************************************************/
-gdouble
-gl_label_ellipse_get_line_width (glLabelEllipse *lellipse)
-{
- g_return_val_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse), 0.0);
-
- return lellipse->private->line_width;
-}
-
-guint
-gl_label_ellipse_get_line_color (glLabelEllipse *lellipse)
-{
- g_return_val_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse), 0);
-
- return lellipse->private->line_color;
-}
-
-guint
-gl_label_ellipse_get_fill_color (glLabelEllipse *lellipse)
-{
- g_return_val_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse), 0);
-
- return lellipse->private->fill_color;
-}
-
/*---------------------------------------------------------------------------*/
/* PRIVATE. Set fill color method. */
/*---------------------------------------------------------------------------*/
}
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. Get fill color method. */
+/*---------------------------------------------------------------------------*/
+static gdouble
+get_line_width (glLabelObject *object)
+{
+ glLabelEllipse *lellipse = (glLabelEllipse *)object;
+
+ g_return_val_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse), 0.0);
+
+ return lellipse->private->line_width;
+}
+
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. Get line color method. */
+/*---------------------------------------------------------------------------*/
+static guint
+get_line_color (glLabelObject *object)
+{
+ glLabelEllipse *lellipse = (glLabelEllipse *)object;
+
+ g_return_val_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse), 0);
+
+ return lellipse->private->line_color;
+}
+
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. Get line width method. */
+/*---------------------------------------------------------------------------*/
+static guint
+get_fill_color (glLabelObject *object)
+{
+ glLabelEllipse *lellipse = (glLabelEllipse *)object;
+
+ g_return_val_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse), 0);
+
+ return lellipse->private->fill_color;
+}
+
+
GObject *gl_label_ellipse_new (glLabel *label);
-void gl_label_ellipse_set_line_width (glLabelEllipse *lellipse,
- gdouble line_width);
-
-void gl_label_ellipse_set_line_color (glLabelEllipse *lellipse,
- guint line_color);
-
-void gl_label_ellipse_set_fill_color (glLabelEllipse *lellipse,
- guint fill_color);
-
-gdouble gl_label_ellipse_get_line_width (glLabelEllipse *lellipse);
-guint gl_label_ellipse_get_line_color (glLabelEllipse *lellipse);
-guint gl_label_ellipse_get_fill_color (glLabelEllipse *lellipse);
-
-
G_END_DECLS
#endif /* __LABEL_ELLIPSE_H__ */
/* Private function prototypes. */
/*========================================================*/
-static void gl_label_line_class_init (glLabelLineClass *klass);
-static void gl_label_line_instance_init (glLabelLine *lline);
-static void gl_label_line_finalize (GObject *object);
+static void gl_label_line_class_init (glLabelLineClass *klass);
+static void gl_label_line_instance_init (glLabelLine *lline);
+static void gl_label_line_finalize (GObject *object);
-static void copy (glLabelObject *dst_object,
- glLabelObject *src_object);
+static void copy (glLabelObject *dst_object,
+ glLabelObject *src_object);
-static void set_line_color (glLabelObject *object,
- guint line_color);
+static void set_line_color (glLabelObject *object,
+ guint line_color);
-static void set_line_width (glLabelObject *object,
- gdouble line_width);
+static void set_line_width (glLabelObject *object,
+ gdouble line_width);
+
+static guint get_line_color (glLabelObject *object);
+
+static gdouble get_line_width (glLabelObject *object);
\f
label_object_class->copy = copy;
label_object_class->set_line_color = set_line_color;
label_object_class->set_line_width = set_line_width;
+ label_object_class->get_line_color = get_line_color;
+ label_object_class->get_line_width = get_line_width;
object_class->finalize = gl_label_line_finalize;
}
g_return_if_fail (lline && GL_IS_LABEL_LINE (lline));
g_return_if_fail (new_lline && GL_IS_LABEL_LINE (new_lline));
- line_width = gl_label_line_get_line_width (lline);
- line_color = gl_label_line_get_line_color (lline);
+ line_width = get_line_width (src_object);
+ line_color = get_line_color (src_object);
- gl_label_line_set_line_width (new_lline, line_width);
- gl_label_line_set_line_color (new_lline, line_color);
+ set_line_width (dst_object, line_width);
+ set_line_color (dst_object, line_color);
gl_debug (DEBUG_LABEL, "END");
}
-/*****************************************************************************/
-/* Set object params. */
-/*****************************************************************************/
-void
-gl_label_line_set_line_width (glLabelLine *lline,
- gdouble line_width)
-{
- g_return_if_fail (lline && GL_IS_LABEL_LINE (lline));
-
- if ( lline->private->line_width != line_width ) {
- lline->private->line_width = line_width;
- gl_label_object_emit_changed (GL_LABEL_OBJECT(lline));
- }
-}
-
-void
-gl_label_line_set_line_color (glLabelLine *lline,
- guint line_color)
-{
- g_return_if_fail (lline && GL_IS_LABEL_LINE (lline));
-
- if ( lline->private->line_color != line_color ) {
- lline->private->line_color = line_color;
- gl_label_object_emit_changed (GL_LABEL_OBJECT(lline));
- }
-}
-
-
-/*****************************************************************************/
-/* Get object params. */
-/*****************************************************************************/
-gdouble
-gl_label_line_get_line_width (glLabelLine *lline)
-{
- g_return_val_if_fail (lline && GL_IS_LABEL_LINE (lline), 0.0);
-
- return lline->private->line_width;
-}
-
-guint
-gl_label_line_get_line_color (glLabelLine *lline)
-{
- g_return_val_if_fail (lline && GL_IS_LABEL_LINE (lline), 0);
-
- return lline->private->line_color;
-}
-
/*---------------------------------------------------------------------------*/
/* PRIVATE. Set line color method. */
/*---------------------------------------------------------------------------*/
}
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. Get line color method. */
+/*---------------------------------------------------------------------------*/
+static gdouble
+get_line_width (glLabelObject *object)
+{
+ glLabelLine *lline = (glLabelLine *)object;
+
+ g_return_val_if_fail (lline && GL_IS_LABEL_LINE (lline), 0.0);
+
+ return lline->private->line_width;
+}
+
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. Get line width method. */
+/*---------------------------------------------------------------------------*/
+static guint
+get_line_color (glLabelObject *object)
+{
+ glLabelLine *lline = (glLabelLine *)object;
+
+ g_return_val_if_fail (lline && GL_IS_LABEL_LINE (lline), 0);
+
+ return lline->private->line_color;
+}
+
GObject *gl_label_line_new (glLabel *label);
-void gl_label_line_set_line_width (glLabelLine *lline,
- gdouble line_width);
-
-void gl_label_line_set_line_color (glLabelLine *lline,
- guint line_color);
-
-gdouble gl_label_line_get_line_width (glLabelLine *lline);
-guint gl_label_line_get_line_color (glLabelLine *lline);
-
G_END_DECLS
gl_debug (DEBUG_LABEL, "END");
}
+/*****************************************************************************/
+/* Get font family for all text contained in object. */
+/*****************************************************************************/
+gchar *
+gl_label_object_get_font_family (glLabelObject *object)
+{
+ gchar *ret = NULL;
+
+ gl_debug (DEBUG_LABEL, "START");
+
+ g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), NULL);
+
+ if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_font_family != NULL ) {
+
+ /* We have an object specific method, use it */
+ ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_font_family (object);
+
+ }
+
+ gl_debug (DEBUG_LABEL, "END");
+
+ return ret;
+}
+
+/****************************************************************************/
+/* Get font size for all text contained in object. */
+/****************************************************************************/
+gdouble
+gl_label_object_get_font_size (glLabelObject *object)
+{
+ gdouble ret = 0.0;
+
+ gl_debug (DEBUG_LABEL, "START");
+
+ g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0.0);
+
+ if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_font_size != NULL ) {
+
+ /* We have an object specific method, use it */
+ ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_font_size (object);
+
+ }
+
+ gl_debug (DEBUG_LABEL, "END");
+
+ return ret;
+}
+
+/****************************************************************************/
+/* Get font weight for all text contained in object. */
+/****************************************************************************/
+GnomeFontWeight
+gl_label_object_get_font_weight (glLabelObject *object)
+{
+ GnomeFontWeight ret = GNOME_FONT_BOOK;
+
+ gl_debug (DEBUG_LABEL, "START");
+
+ g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), GNOME_FONT_BOOK);
+
+ if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_font_weight != NULL ) {
+
+ /* We have an object specific method, use it */
+ ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_font_weight (object);
+
+ }
+
+ gl_debug (DEBUG_LABEL, "END");
+
+ return ret;
+}
+
+/****************************************************************************/
+/* Get font italic flag for all text contained in object. */
+/****************************************************************************/
+gboolean
+gl_label_object_get_font_italic_flag (glLabelObject *object)
+{
+ gboolean ret = FALSE;
+
+ gl_debug (DEBUG_LABEL, "START");
+
+ g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE);
+
+ if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_font_italic_flag != NULL ) {
+
+ /* We have an object specific method, use it */
+ ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_font_italic_flag (object);
+
+ }
+
+ gl_debug (DEBUG_LABEL, "END");
+
+ return ret;
+}
+
+/****************************************************************************/
+/* Get text alignment for all text contained in object. */
+/****************************************************************************/
+GtkJustification
+gl_label_object_get_text_alignment (glLabelObject *object)
+{
+ GtkJustification ret = GTK_JUSTIFY_LEFT;
+
+ gl_debug (DEBUG_LABEL, "START");
+
+ g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), GTK_JUSTIFY_LEFT);
+
+ if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_text_alignment != NULL ) {
+
+ /* We have an object specific method, use it */
+ ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_text_alignment (object);
+
+ }
+
+ gl_debug (DEBUG_LABEL, "END");
+
+ return ret;
+}
+
+/****************************************************************************/
+/* Get text color for all text contained in object. */
+/****************************************************************************/
+guint
+gl_label_object_get_text_color (glLabelObject *object)
+{
+ guint ret = 0;
+
+ gl_debug (DEBUG_LABEL, "START");
+
+ g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0);
+
+ if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_text_color != NULL ) {
+
+ /* We have an object specific method, use it */
+ ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_text_color (object);
+
+ }
+
+ gl_debug (DEBUG_LABEL, "END");
+
+ return ret;
+}
+
/*****************************************************************************/
/* Can fill properties be set for this object? */
/*****************************************************************************/
gl_debug (DEBUG_LABEL, "END");
}
+/****************************************************************************/
+/* Get fill color for object. */
+/****************************************************************************/
+guint
+gl_label_object_get_fill_color (glLabelObject *object)
+{
+ guint ret = 0;
+
+ gl_debug (DEBUG_LABEL, "START");
+
+ g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0);
+
+ if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_fill_color != NULL ) {
+
+ /* We have an object specific method, use it */
+ ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_fill_color (object);
+
+ }
+
+ gl_debug (DEBUG_LABEL, "END");
+
+ return ret;
+}
+
/*****************************************************************************/
/* Can line color property be set for this object? */
/*****************************************************************************/
gl_debug (DEBUG_LABEL, "END");
}
+/****************************************************************************/
+/* Get line color for object. */
+/****************************************************************************/
+guint
+gl_label_object_get_line_color (glLabelObject *object)
+{
+ guint ret = 0;
+
+ gl_debug (DEBUG_LABEL, "START");
+
+ g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0);
+
+ if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_line_color != NULL ) {
+
+ /* We have an object specific method, use it */
+ ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_line_color (object);
+
+ }
+
+ gl_debug (DEBUG_LABEL, "END");
+
+ return ret;
+}
+
/*****************************************************************************/
/* Can line width property be set for this object? */
/*****************************************************************************/
gl_debug (DEBUG_LABEL, "END");
}
+/****************************************************************************/
+/* Get line width for object. */
+/****************************************************************************/
+gdouble
+gl_label_object_get_line_width (glLabelObject *object)
+{
+ gdouble ret = 0.0;
+
+ gl_debug (DEBUG_LABEL, "START");
+
+ g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0.0);
+
+ if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_line_width != NULL ) {
+
+ /* We have an object specific method, use it */
+ ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_line_width (object);
+
+ }
+
+ gl_debug (DEBUG_LABEL, "END");
+
+ return ret;
+}
+
/****************************************************************************/
/* Flip object horizontally. */
/****************************************************************************/
* Methods
*/
- void (*set_size) (glLabelObject *object,
- gdouble w,
- gdouble h);
+ void (*set_size) (glLabelObject *object,
+ gdouble w,
+ gdouble h);
- void (*get_size) (glLabelObject *object,
- gdouble *w,
- gdouble *h);
+ void (*get_size) (glLabelObject *object,
+ gdouble *w,
+ gdouble *h);
- void (*set_font_family) (glLabelObject *object,
- const gchar *font_family);
+ void (*set_font_family) (glLabelObject *object,
+ const gchar *font_family);
- void (*set_font_size) (glLabelObject *object,
- gdouble font_size);
+ void (*set_font_size) (glLabelObject *object,
+ gdouble font_size);
- void (*set_font_weight) (glLabelObject *object,
- GnomeFontWeight font_weight);
+ void (*set_font_weight) (glLabelObject *object,
+ GnomeFontWeight font_weight);
- void (*set_font_italic_flag) (glLabelObject *object,
- gboolean font_italic_flag);
+ void (*set_font_italic_flag) (glLabelObject *object,
+ gboolean font_italic_flag);
- void (*set_text_alignment) (glLabelObject *object,
- GtkJustification text_alignment);
+ void (*set_text_alignment) (glLabelObject *object,
+ GtkJustification text_alignment);
- void (*set_text_color) (glLabelObject *object,
- guint text_color);
+ void (*set_text_color) (glLabelObject *object,
+ guint text_color);
- void (*set_fill_color) (glLabelObject *object,
- guint fill_color);
+ void (*set_fill_color) (glLabelObject *object,
+ guint fill_color);
- void (*set_line_color) (glLabelObject *object,
- guint line_color);
+ void (*set_line_color) (glLabelObject *object,
+ guint line_color);
- void (*set_line_width) (glLabelObject *object,
- gdouble line_width);
+ void (*set_line_width) (glLabelObject *object,
+ gdouble line_width);
- void (*copy) (glLabelObject *dst_object,
- glLabelObject *src_object);
+ gchar *(*get_font_family) (glLabelObject *object);
+
+ gdouble (*get_font_size) (glLabelObject *object);
+
+ GnomeFontWeight (*get_font_weight) (glLabelObject *object);
+
+ gboolean (*get_font_italic_flag) (glLabelObject *object);
+
+ GtkJustification (*get_text_alignment) (glLabelObject *object);
+
+ guint (*get_text_color) (glLabelObject *object);
+
+ guint (*get_fill_color) (glLabelObject *object);
+
+ guint (*get_line_color) (glLabelObject *object);
+
+ gdouble (*get_line_width) (glLabelObject *object);
+
+ void (*copy) (glLabelObject *dst_object,
+ glLabelObject *src_object);
/*
* Signals
gdouble *x2,
gdouble *y2);
+
gboolean gl_label_object_can_text (glLabelObject *object);
void gl_label_object_set_font_family (glLabelObject *object,
guint text_color);
+gchar *gl_label_object_get_font_family (glLabelObject *object);
+
+gdouble gl_label_object_get_font_size (glLabelObject *object);
+
+GnomeFontWeight gl_label_object_get_font_weight (glLabelObject *object);
+
+gboolean gl_label_object_get_font_italic_flag (glLabelObject *object);
+
+GtkJustification gl_label_object_get_text_alignment (glLabelObject *object);
+
+guint gl_label_object_get_text_color (glLabelObject *object);
+
+
gboolean gl_label_object_can_fill (glLabelObject *object);
void gl_label_object_set_fill_color (glLabelObject *object,
guint fill_color);
+guint gl_label_object_get_fill_color (glLabelObject *object);
+
gboolean gl_label_object_can_line_color (glLabelObject *object);
void gl_label_object_set_line_color (glLabelObject *object,
guint line_color);
+guint gl_label_object_get_line_color (glLabelObject *object);
+
gboolean gl_label_object_can_line_width (glLabelObject *object);
void gl_label_object_set_line_width (glLabelObject *object,
gdouble line_width);
+gdouble gl_label_object_get_line_width (glLabelObject *object);
+
void gl_label_object_raise_to_top (glLabelObject *object);
static void set_text_color (glLabelObject *object,
guint text_color);
+static gchar *get_font_family (glLabelObject *object);
+
+static gdouble get_font_size (glLabelObject *object);
+
+static GnomeFontWeight get_font_weight (glLabelObject *object);
+
+static gboolean get_font_italic_flag (glLabelObject *object);
+
+static GtkJustification get_text_alignment (glLabelObject *object);
+
+static guint get_text_color (glLabelObject *object);
+
\f
/*****************************************************************************/
/* Boilerplate object stuff. */
label_object_class->set_font_italic_flag = set_font_italic_flag;
label_object_class->set_text_alignment = set_text_alignment;
label_object_class->set_text_color = set_text_color;
+ label_object_class->get_font_family = get_font_family;
+ label_object_class->get_font_size = get_font_size;
+ label_object_class->get_font_weight = get_font_weight;
+ label_object_class->get_font_italic_flag = get_font_italic_flag;
+ label_object_class->get_text_alignment = get_text_alignment;
+ label_object_class->get_text_color = get_text_color;
object_class->finalize = gl_label_text_finalize;
}
g_return_if_fail (new_ltext && GL_IS_LABEL_TEXT (new_ltext));
lines = gl_label_text_get_lines (ltext);
- gl_label_text_get_props (ltext,
- &font_family, &font_size, &font_weight,
- &font_italic_flag,
- &color, &just);
-
gl_label_text_set_lines (new_ltext, lines);
- gl_label_text_set_props (new_ltext,
- font_family, font_size, font_weight,
- font_italic_flag,
- color, just);
+
+ new_ltext->private->font_family = g_strdup (ltext->private->font_family);
+ new_ltext->private->font_size = ltext->private->font_size;
+ new_ltext->private->font_weight = ltext->private->font_weight;
+ new_ltext->private->font_italic_flag = ltext->private->font_italic_flag;
+ new_ltext->private->color = ltext->private->color;
+ new_ltext->private->just = ltext->private->just;
gl_text_node_lines_free (&lines);
g_free (font_family);
gl_debug (DEBUG_LABEL, "END");
}
-void
-gl_label_text_set_props (glLabelText *ltext,
- gchar *font_family,
- gdouble font_size,
- GnomeFontWeight font_weight,
- gboolean font_italic_flag,
- guint color,
- GtkJustification just)
-{
- GList *family_names;
- gchar *good_font_family;
-
- gl_debug (DEBUG_LABEL, "START");
-
- g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext));
-
- /* Make sure we have a valid font family. if not provide a good default. */
- family_names = gnome_font_family_list ();
- if (g_list_find_custom (family_names, font_family, (GCompareFunc)g_utf8_collate)) {
- good_font_family = g_strdup (font_family);
- } else {
- if (family_names != NULL) {
- good_font_family = g_strdup (family_names->data); /* 1st entry */
- } else {
- good_font_family = NULL;
- }
- }
- gnome_font_family_list_free (family_names);
-
- g_free (ltext->private->font_family);
-
- ltext->private->font_family = good_font_family;
- ltext->private->font_size = font_size;
- ltext->private->font_weight = font_weight;
- ltext->private->font_italic_flag = font_italic_flag;
- ltext->private->color = color;
- ltext->private->just = just;
-
- gl_debug (DEBUG_LABEL, "just = %d", ltext->private->just);
-
- gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext));
-
- gl_debug (DEBUG_LABEL, "END");
-}
-
-
/*****************************************************************************/
/* Get object params. */
/*****************************************************************************/
return lines;
}
-void
-gl_label_text_get_props (glLabelText *ltext,
- gchar **font_family,
- gdouble *font_size,
- GnomeFontWeight *font_weight,
- gboolean *font_italic_flag,
- guint *color,
- GtkJustification *just)
-{
- g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext));
-
- *font_family = g_strdup (ltext->private->font_family);
- *font_size = ltext->private->font_size;
- *font_weight = ltext->private->font_weight;
- *font_italic_flag = ltext->private->font_italic_flag;
- *color = ltext->private->color;
- *just = ltext->private->just;
-
- gl_debug (DEBUG_LABEL, "just = %d", *just);
-}
-
-GtkJustification
-gl_label_text_get_text_alignment (glLabelText *ltext)
-{
- g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext));
-
- return ltext->private->just;
-}
-
void
gl_label_text_get_box (glLabelText *ltext,
gdouble *w,
gl_debug (DEBUG_LABEL, "END");
}
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. get font family method. */
+/*---------------------------------------------------------------------------*/
+static gchar *
+get_font_family (glLabelObject *object)
+{
+ glLabelText *ltext = (glLabelText *)object;
+
+ gl_debug (DEBUG_LABEL, "");
+
+ g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), NULL);
+
+ return g_strdup (ltext->private->font_family);
+}
+
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. get font size method. */
+/*---------------------------------------------------------------------------*/
+static gdouble
+get_font_size (glLabelObject *object)
+{
+ glLabelText *ltext = (glLabelText *)object;
+
+ gl_debug (DEBUG_LABEL, "");
+
+ g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), 0.0);
+
+ return ltext->private->font_size;
+}
+
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. get font weight method. */
+/*---------------------------------------------------------------------------*/
+static GnomeFontWeight
+get_font_weight (glLabelObject *object)
+{
+ glLabelText *ltext = (glLabelText *)object;
+
+ gl_debug (DEBUG_LABEL, "");
+
+ g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), GNOME_FONT_BOOK);
+
+ return ltext->private->font_weight;
+}
+
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. get font italic flag method. */
+/*---------------------------------------------------------------------------*/
+static gboolean
+get_font_italic_flag (glLabelObject *object)
+{
+ glLabelText *ltext = (glLabelText *)object;
+
+ gl_debug (DEBUG_LABEL, "");
+
+ g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), FALSE);
+
+ return ltext->private->font_italic_flag;
+}
+
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. get text alignment method. */
+/*---------------------------------------------------------------------------*/
+static GtkJustification
+get_text_alignment (glLabelObject *object)
+{
+ glLabelText *ltext = (glLabelText *)object;
+
+ gl_debug (DEBUG_LABEL, "");
+
+ g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), GTK_JUSTIFY_LEFT);
+
+ return ltext->private->just;
+}
+
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. get text color method. */
+/*---------------------------------------------------------------------------*/
+static guint
+get_text_color (glLabelObject *object)
+{
+ glLabelText *ltext = (glLabelText *)object;
+
+ gl_debug (DEBUG_LABEL, "");
+
+ g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), 0);
+
+ return ltext->private->color;
+}
+
void gl_label_text_set_lines (glLabelText *ltext,
GList *lines);
-void gl_label_text_set_props (glLabelText *ltext,
- gchar *font_family,
- gdouble font_size,
- GnomeFontWeight font_weight,
- gboolean font_italic_flag,
- guint color,
- GtkJustification just);
-
GtkTextBuffer *gl_label_text_get_buffer (glLabelText *ltext);
GList *gl_label_text_get_lines (glLabelText *ltext);
-void gl_label_text_get_props (glLabelText *ltext,
- gchar **font_family,
- gdouble *font_size,
- GnomeFontWeight *font_weight,
- gboolean *font_italic_flag,
- guint *color,
- GtkJustification *just);
-
-GtkJustification gl_label_text_get_text_alignment (glLabelText *ltext);
-
void gl_label_text_get_box (glLabelText *ltext,
gdouble *w,
gdouble *h);
gl_label_object_get_size (GL_LABEL_OBJECT(object), &object_w, &object_h);
lines = gl_label_text_get_lines (object);
- gl_label_text_get_props (object,
- &font_family, &font_size, &font_weight,
- &font_italic_flag,
- &color, &just);
+ font_family = gl_label_object_get_font_family (GL_LABEL_OBJECT(object));
+ font_size = gl_label_object_get_font_size (GL_LABEL_OBJECT(object));
+ font_weight = gl_label_object_get_font_weight (GL_LABEL_OBJECT(object));
+ font_italic_flag = gl_label_object_get_font_italic_flag (GL_LABEL_OBJECT(object));
+ color = gl_label_object_get_text_color (GL_LABEL_OBJECT(object));
+ just = gl_label_object_get_text_alignment (GL_LABEL_OBJECT(object));
font = gnome_font_find_closest_from_weight_slant (
font_family,
gl_debug (DEBUG_PRINT, "START");
gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h);
- line_width = gl_label_box_get_line_width (object);
- line_color = gl_label_box_get_line_color (object);
- fill_color = gl_label_box_get_fill_color (object);
+ line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object));
+ line_color = gl_label_object_get_line_color (GL_LABEL_OBJECT(object));
+ fill_color = gl_label_object_get_fill_color (GL_LABEL_OBJECT(object));
/* Paint fill color */
create_rectangle_path (pi->pc, 0.0, 0.0, w, h);
gl_debug (DEBUG_PRINT, "START");
gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h);
- line_width = gl_label_line_get_line_width (object);
- line_color = gl_label_line_get_line_color (object);
+ line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object));
+ line_color = gl_label_object_get_line_color (GL_LABEL_OBJECT(object));
gnome_print_moveto (pi->pc, 0.0, 0.0);
gnome_print_lineto (pi->pc, w, h);
gl_debug (DEBUG_PRINT, "START");
gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h);
- line_width = gl_label_ellipse_get_line_width (object);
- line_color = gl_label_ellipse_get_line_color (object);
- fill_color = gl_label_ellipse_get_fill_color (object);
+ line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object));
+ line_color = gl_label_object_get_line_color (GL_LABEL_OBJECT(object));
+ fill_color = gl_label_object_get_fill_color (GL_LABEL_OBJECT(object));
rx = w / 2.0;
ry = h / 2.0;
text_node = gl_label_barcode_get_data (object);
gl_label_barcode_get_props (object,
- &style, &text_flag, &checksum_flag, &color);
+ &style, &text_flag, &checksum_flag);
+ color = gl_label_object_get_line_color (GL_LABEL_OBJECT(object));
gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h);
text = gl_text_node_expand (text_node, record);
gl_object_editor_get_bc_style (editor, &style, &text_flag, &cs_flag);
color = gl_object_editor_get_bc_color (editor);
gl_label_barcode_set_props (GL_LABEL_BARCODE(object),
- style, text_flag, cs_flag, color);
+ style, text_flag, cs_flag);
+ gl_label_object_set_line_color (object, color);
g_signal_handlers_unblock_by_func (G_OBJECT(object),
update_editor_from_object_cb,
gl_object_editor_set_size (editor, w, h);
gl_label_barcode_get_props (GL_LABEL_BARCODE(object),
- &style, &text_flag, &cs_flag, &color);
+ &style, &text_flag, &cs_flag);
+ color = gl_label_object_get_line_color (object);
gl_object_editor_set_bc_style (editor, style, text_flag, cs_flag);
gl_object_editor_set_bc_color (editor, color);
gl_label_barcode_set_props (GL_LABEL_BARCODE(object),
GL_BARCODE_STYLE_POSTNET,
FALSE,
- TRUE,
+ TRUE);
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object),
gl_color_set_opacity (
gl_view_get_default_line_color(view),
0.5));
gl_label_barcode_set_props (GL_LABEL_BARCODE(object),
GL_BARCODE_STYLE_POSTNET,
FALSE,
- TRUE,
- gl_view_get_default_line_color(view));
+ TRUE);
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object),
+ gl_view_get_default_line_color(view));
gl_view_unselect_all (view);
gl_view_object_select (GL_VIEW_OBJECT(view_barcode));
gl_view_arrow_mode (view);
/* Query label object and properties */
object = gl_view_object_get_object (GL_VIEW_OBJECT(view_barcode));
gl_label_barcode_get_props (GL_LABEL_BARCODE(object),
- &style, &text_flag, &checksum_flag, &color);
+ &style, &text_flag, &checksum_flag);
+ color = gl_label_object_get_line_color (object);
gl_label_object_get_size (object, &w, &h);
text_node = gl_label_barcode_get_data(GL_LABEL_BARCODE(object));
if (text_node->field_flag) {
/* Query properties of object. */
gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h);
- line_width = gl_label_box_get_line_width(object);
- line_color = gl_label_box_get_line_color(object);
- fill_color = gl_label_box_get_fill_color(object);
+ line_width = gl_label_object_get_line_width(GL_LABEL_OBJECT(object));
+ line_color = gl_label_object_get_line_color(GL_LABEL_OBJECT(object));
+ fill_color = gl_label_object_get_fill_color(GL_LABEL_OBJECT(object));
/* Create analogous canvas item. */
view_box->private->item =
/* Query properties of object. */
gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h);
- line_width = gl_label_box_get_line_width(GL_LABEL_BOX(object));
- line_color = gl_label_box_get_line_color(GL_LABEL_BOX(object));
- fill_color = gl_label_box_get_fill_color(GL_LABEL_BOX(object));
+ line_width = gl_label_object_get_line_width(GL_LABEL_OBJECT(object));
+ line_color = gl_label_object_get_line_color(GL_LABEL_OBJECT(object));
+ fill_color = gl_label_object_get_fill_color(GL_LABEL_OBJECT(object));
/* Adjust appearance of analogous canvas item. */
gnome_canvas_item_set (view_box->private->item,
gl_label_object_get_size (object, &w, &h);
gl_object_editor_set_size (editor, w, h);
- fill_color = gl_label_box_get_fill_color (GL_LABEL_BOX(object));
+ fill_color = gl_label_object_get_fill_color (GL_LABEL_OBJECT(object));
gl_object_editor_set_fill_color (editor, fill_color);
- line_color = gl_label_box_get_line_color (GL_LABEL_BOX(object));
+ line_color = gl_label_object_get_line_color (GL_LABEL_OBJECT(object));
gl_object_editor_set_line_color (editor, line_color);
- line_width = gl_label_box_get_line_width (GL_LABEL_BOX(object));
+ line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object));
gl_object_editor_set_line_width (editor, line_width);
gl_debug (DEBUG_VIEW, "END");
0.0, 0.0);
line_color = gl_color_set_opacity (gl_view_get_default_line_color(view), 0.5);
fill_color = gl_color_set_opacity (gl_view_get_default_fill_color(view), 0.5);
- gl_label_box_set_line_width (GL_LABEL_BOX(object),
+ gl_label_object_set_line_width (GL_LABEL_OBJECT(object),
gl_view_get_default_line_width(view));
- gl_label_box_set_line_color (GL_LABEL_BOX(object),
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object),
line_color);
- gl_label_box_set_fill_color (GL_LABEL_BOX(object),
+ gl_label_object_set_fill_color (GL_LABEL_OBJECT(object),
fill_color);
view_box = gl_view_box_new (GL_LABEL_BOX(object),
view);
h = MAX (y, y0) - MIN (y, y0);
gl_label_object_set_size (GL_LABEL_OBJECT(object),
w, h);
- gl_label_box_set_line_color (GL_LABEL_BOX(object),
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object),
gl_view_get_default_line_color(view));
- gl_label_box_set_fill_color (GL_LABEL_BOX(object),
+ gl_label_object_set_fill_color (GL_LABEL_OBJECT(object),
gl_view_get_default_fill_color(view));
gl_view_unselect_all (view);
gl_view_object_select (GL_VIEW_OBJECT(view_box));
/* Query properties of object. */
gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h);
- line_width = gl_label_ellipse_get_line_width(object);
- line_color = gl_label_ellipse_get_line_color(object);
- fill_color = gl_label_ellipse_get_fill_color(object);
+ line_width = gl_label_object_get_line_width(GL_LABEL_OBJECT(object));
+ line_color = gl_label_object_get_line_color(GL_LABEL_OBJECT(object));
+ fill_color = gl_label_object_get_fill_color(GL_LABEL_OBJECT(object));
/* Create analogous canvas item. */
view_ellipse->private->item =
/* Query properties of object. */
gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h);
- line_width = gl_label_ellipse_get_line_width(GL_LABEL_ELLIPSE(object));
- line_color = gl_label_ellipse_get_line_color(GL_LABEL_ELLIPSE(object));
- fill_color = gl_label_ellipse_get_fill_color(GL_LABEL_ELLIPSE(object));
+ line_width = gl_label_object_get_line_width(GL_LABEL_OBJECT(object));
+ line_color = gl_label_object_get_line_color(GL_LABEL_OBJECT(object));
+ fill_color = gl_label_object_get_fill_color(GL_LABEL_OBJECT(object));
/* Adjust appearance of analogous canvas item. */
gnome_canvas_item_set (view_ellipse->private->item,
gl_label_object_get_size (object, &w, &h);
gl_object_editor_set_size (editor, w, h);
- fill_color = gl_label_ellipse_get_fill_color (GL_LABEL_ELLIPSE(object));
+ fill_color = gl_label_object_get_fill_color (GL_LABEL_OBJECT(object));
gl_object_editor_set_fill_color (editor, fill_color);
- line_color = gl_label_ellipse_get_line_color (GL_LABEL_ELLIPSE(object));
+ line_color = gl_label_object_get_line_color (GL_LABEL_OBJECT(object));
gl_object_editor_set_line_color (editor, line_color);
- line_width = gl_label_ellipse_get_line_width (GL_LABEL_ELLIPSE(object));
+ line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object));
gl_object_editor_set_line_width (editor, line_width);
gl_debug (DEBUG_VIEW, "END");
0.0, 0.0);
line_color = gl_color_set_opacity (gl_view_get_default_line_color(view), 0.5);
fill_color = gl_color_set_opacity (gl_view_get_default_fill_color(view), 0.5);
- gl_label_ellipse_set_line_width (GL_LABEL_ELLIPSE(object),
+ gl_label_object_set_line_width (GL_LABEL_OBJECT(object),
gl_view_get_default_line_width(view));
- gl_label_ellipse_set_line_color (GL_LABEL_ELLIPSE(object),
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object),
line_color);
- gl_label_ellipse_set_fill_color (GL_LABEL_ELLIPSE(object),
+ gl_label_object_set_fill_color (GL_LABEL_OBJECT(object),
fill_color);
view_ellipse = gl_view_ellipse_new (GL_LABEL_ELLIPSE(object),
view);
h = MAX (y, y0) - MIN (y, y0);
gl_label_object_set_size (GL_LABEL_OBJECT(object),
w, h);
- gl_label_ellipse_set_line_color (GL_LABEL_ELLIPSE(object),
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object),
gl_view_get_default_line_color(view));
- gl_label_ellipse_set_fill_color (GL_LABEL_ELLIPSE(object),
+ gl_label_object_set_fill_color (GL_LABEL_OBJECT(object),
gl_view_get_default_fill_color(view));
gl_view_unselect_all (view);
gl_view_object_select (GL_VIEW_OBJECT(view_ellipse));
/* Query properties of object. */
gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h);
- line_width = gl_label_line_get_line_width(object);
- line_color = gl_label_line_get_line_color(object);
+ line_width = gl_label_object_get_line_width(GL_LABEL_OBJECT(object));
+ line_color = gl_label_object_get_line_color(GL_LABEL_OBJECT(object));
/* Create analogous canvas item. */
points = gnome_canvas_points_new (2);
/* Query properties of object. */
gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h);
- line_width = gl_label_line_get_line_width(GL_LABEL_LINE(object));
- line_color = gl_label_line_get_line_color(GL_LABEL_LINE(object));
+ line_width = gl_label_object_get_line_width(GL_LABEL_OBJECT(object));
+ line_color = gl_label_object_get_line_color(GL_LABEL_OBJECT(object));
/* Adjust appearance of analogous canvas item. */
points = gnome_canvas_points_new (2);
gl_label_object_get_size (object, &w, &h);
gl_object_editor_set_lsize (editor, w, h);
- line_color = gl_label_line_get_line_color (GL_LABEL_LINE(object));
+ line_color = gl_label_object_get_line_color (GL_LABEL_OBJECT(object));
gl_object_editor_set_line_color (editor, line_color);
- line_width = gl_label_line_get_line_width (GL_LABEL_LINE(object));
+ line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object));
gl_object_editor_set_line_width (editor, line_width);
gl_debug (DEBUG_VIEW, "END");
gl_label_get_size (label, &label_width, &label_height);
gl_object_editor_set_max_position (GL_OBJECT_EDITOR (editor),
label_width, label_height);
- gl_object_editor_set_max_size (GL_OBJECT_EDITOR (editor),
- label_width, label_height);
+ gl_object_editor_set_max_lsize (GL_OBJECT_EDITOR (editor),
+ label_width, label_height);
gl_debug (DEBUG_VIEW, "END");
}
x, y);
gl_label_object_set_size (GL_LABEL_OBJECT(object),
0.0, 0.0);
- gl_label_line_set_line_width (GL_LABEL_LINE(object),
+ gl_label_object_set_line_width (GL_LABEL_OBJECT(object),
gl_view_get_default_line_width(view));
- gl_label_line_set_line_color (GL_LABEL_LINE(object),
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object),
gl_color_set_opacity (gl_view_get_default_line_color(view), 0.5));
view_line = gl_view_line_new (GL_LABEL_LINE(object),
view);
h = y - y0;
gl_label_object_set_size (GL_LABEL_OBJECT(object),
w, h);
- gl_label_line_set_line_color (GL_LABEL_LINE(object),
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object),
gl_view_get_default_line_color(view));
gl_view_unselect_all (view);
gl_view_object_select (GL_VIEW_OBJECT(view_line));
gl_object_editor_get_position (editor, &x, &y);
- gl_label_object_set_position (object, x, y);
-
gl_object_editor_get_size (editor, &w, &h);
- gl_label_object_set_size (object, w, h);
-
font_family = gl_object_editor_get_font_family (editor);
- gl_label_object_set_font_family (object, font_family);
- g_free (font_family);
-
font_size = gl_object_editor_get_font_size (editor);
- gl_label_object_set_font_size (object, font_size);
-
font_weight = gl_object_editor_get_font_weight (editor);
- gl_label_object_set_font_weight (object, font_weight);
-
font_italic_flag = gl_object_editor_get_font_italic_flag (editor);
- gl_label_object_set_font_italic_flag (object, font_italic_flag);
-
color = gl_object_editor_get_text_color (editor);
- gl_label_object_set_text_color (object, color);
-
just = gl_object_editor_get_text_alignment (editor);
+
+ gl_label_object_set_position (object, x, y);
+ gl_label_object_set_size (object, w, h);
+ gl_label_object_set_font_family (object, font_family);
+ gl_label_object_set_font_size (object, font_size);
+ gl_label_object_set_font_weight (object, font_weight);
+ gl_label_object_set_font_italic_flag (object, font_italic_flag);
+ gl_label_object_set_text_color (object, color);
gl_label_object_set_text_alignment (object, just);
+ g_free (font_family);
g_signal_handlers_unblock_by_func (G_OBJECT(object),
update_editor_from_object_cb,
gl_label_object_get_size (object, &w, &h);
gl_object_editor_set_size (editor, w, h);
- gl_label_text_get_props (GL_LABEL_TEXT(object),
- &font_family, &font_size,
- &font_weight, &font_italic_flag,
- &color, &just);
+ font_family = gl_label_object_get_font_family (object);
+ font_size = gl_label_object_get_font_size (object);
+ font_weight = gl_label_object_get_font_weight (object);
+ font_italic_flag = gl_label_object_get_font_italic_flag (object);
+ color = gl_label_object_get_text_color (object);
+ just = gl_label_object_get_text_alignment (object);
gl_object_editor_set_font_family (editor, font_family);
- g_free (font_family);
-
gl_object_editor_set_font_size (editor, font_size);
-
gl_object_editor_set_font_weight (editor, font_weight);
-
gl_object_editor_set_font_italic_flag (editor, font_italic_flag);
-
gl_object_editor_set_text_color (editor, color);
-
gl_object_editor_set_text_alignment (editor, just);
+ g_free (font_family);
gl_debug (DEBUG_VIEW, "END");
}
/*****************************************************************************/
int
gl_view_text_create_event_handler (GnomeCanvas *canvas,
- GdkEvent *event,
- glView *view)
+ GdkEvent *event,
+ glView *view)
{
static gdouble x0, y0;
static gboolean dragging = FALSE;
gl_label_object_set_position (GL_LABEL_OBJECT(object),
x, y);
family = gl_view_get_default_font_family (view);
- gl_label_text_set_props (GL_LABEL_TEXT(object),
- family,
- gl_view_get_default_font_size (view),
- gl_view_get_default_font_weight (view),
- gl_view_get_default_font_italic_flag (view),
- gl_color_set_opacity (gl_view_get_default_text_color (view), 0.5),
- gl_view_get_default_text_alignment (view));
+ gl_label_object_set_font_family (GL_LABEL_OBJECT(object), family);
+ gl_label_object_set_font_size (GL_LABEL_OBJECT(object),
+ gl_view_get_default_font_size (view));
+ gl_label_object_set_font_weight (GL_LABEL_OBJECT(object),
+ gl_view_get_default_font_weight (view));
+ gl_label_object_set_font_italic_flag (GL_LABEL_OBJECT(object),
+ gl_view_get_default_font_italic_flag (view));
+ gl_label_object_set_text_color (GL_LABEL_OBJECT(object),
+ gl_color_set_opacity (gl_view_get_default_text_color (view), 0.5));
+ gl_label_object_set_text_alignment (GL_LABEL_OBJECT(object),
+ gl_view_get_default_text_alignment (view));
g_free (family);
lines = gl_text_node_lines_new_from_text (_("Text"));
gl_label_text_set_lines (GL_LABEL_TEXT(object), lines);
gl_label_object_set_position (GL_LABEL_OBJECT(object),
x, y);
family = gl_view_get_default_font_family (view);
- gl_label_text_set_props (GL_LABEL_TEXT(object),
- family,
- gl_view_get_default_font_size (view),
- gl_view_get_default_font_weight (view),
- gl_view_get_default_font_italic_flag (view),
- gl_view_get_default_text_color (view),
- gl_view_get_default_text_alignment (view));
+ gl_label_object_set_font_family (GL_LABEL_OBJECT(object), family);
+ gl_label_object_set_font_size (GL_LABEL_OBJECT(object),
+ gl_view_get_default_font_size (view));
+ gl_label_object_set_font_weight (GL_LABEL_OBJECT(object),
+ gl_view_get_default_font_weight (view));
+ gl_label_object_set_font_italic_flag (GL_LABEL_OBJECT(object),
+ gl_view_get_default_font_italic_flag (view));
+ gl_label_object_set_text_color (GL_LABEL_OBJECT(object),
+ gl_view_get_default_text_color (view));
+ gl_label_object_set_text_alignment (GL_LABEL_OBJECT(object),
+ gl_view_get_default_text_alignment (view));
g_free (family);
gl_view_unselect_all (view);
gl_view_object_select (GL_VIEW_OBJECT(view_text));
/* Query label object and properties */
object = gl_view_object_get_object (GL_VIEW_OBJECT(view_text));
gl_label_object_get_size (object, &object_w, &object_h);
- gl_label_text_get_props (GL_LABEL_TEXT(object),
- &font_family, &font_size,
- &font_weight, &font_italic_flag,
- &color, &just);
+ font_family = gl_label_object_get_font_family (object);
+ font_size = gl_label_object_get_font_size (object);
+ font_weight = gl_label_object_get_font_weight (object);
+ font_italic_flag = gl_label_object_get_font_italic_flag (object);
+ color = gl_label_object_get_text_color (object);
+ just = gl_label_object_get_text_alignment (object);
buffer = gl_label_text_get_buffer(GL_LABEL_TEXT(object));
gtk_text_buffer_get_bounds (buffer, &start, &end);
text = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
/* Query label object and properties */
object = gl_view_object_get_object (GL_VIEW_OBJECT(view_text));
gl_label_object_get_size (object, &object_w, &object_h);
- gl_label_text_get_props (GL_LABEL_TEXT(object),
- &font_family, &font_size,
- &font_weight, &font_italic_flag,
- &color, &just);
+ font_family = gl_label_object_get_font_family (object);
+ font_size = gl_label_object_get_font_size (object);
+ font_weight = gl_label_object_get_font_weight (object);
+ font_italic_flag = gl_label_object_get_font_italic_flag (object);
+ color = gl_label_object_get_text_color (object);
+ just = gl_label_object_get_text_alignment (object);
buffer = gl_label_text_get_buffer(GL_LABEL_TEXT(object));
gtk_text_buffer_get_bounds (buffer, &start, &end);
text = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
color = gl_xml_get_prop_uint (object_node, "color", 0);
- gl_label_text_set_props (object,
- font_family,
- font_size,
- font_weight,
- font_italic_flag,
- color,
- just);
+ gl_label_object_set_font_family (GL_LABEL_OBJECT(object), font_family);
+ gl_label_object_set_font_size (GL_LABEL_OBJECT(object), font_size);
+ gl_label_object_set_font_weight (GL_LABEL_OBJECT(object), font_weight);
+ gl_label_object_set_font_italic_flag (GL_LABEL_OBJECT(object), font_italic_flag);
+ gl_label_object_set_text_color (GL_LABEL_OBJECT(object), color);
+ gl_label_object_set_text_alignment (GL_LABEL_OBJECT(object), just);
lines = NULL;
for (line_node = object_node->xmlChildrenNode; line_node != NULL;
fill_color = gl_xml_get_prop_uint (node, "fill_color", 0);
gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h);
- gl_label_box_set_line_width (object, line_width);
- gl_label_box_set_line_color (object, line_color);
- gl_label_box_set_fill_color (object, fill_color);
+ gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width);
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color);
+ gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), fill_color);
gl_debug (DEBUG_XML, "END");
}
line_color = gl_xml_get_prop_uint (node, "line_color", 0);
gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h);
- gl_label_line_set_line_width (object, line_width);
- gl_label_line_set_line_color (object, line_color);
+ gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width);
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color);
gl_debug (DEBUG_XML, "END");
}
fill_color = gl_xml_get_prop_uint (node, "fill_color", 0);
gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h);
- gl_label_ellipse_set_line_width (object, line_width);
- gl_label_ellipse_set_line_color (object, line_color);
- gl_label_ellipse_set_fill_color (object, fill_color);
+ gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width);
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color);
+ gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), fill_color);
gl_debug (DEBUG_XML, "END");
}
if (scale == 0.0) {
scale = 0.5; /* Set to a valid value */
}
- gl_label_barcode_set_props (object, style, text_flag, color, scale);
+ gl_label_barcode_set_props (object, style, text_flag, TRUE);
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object), color);
child = node->xmlChildrenNode;
text_node = g_new0 (glTextNode, 1);
gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h);
gl_label_text_set_lines (GL_LABEL_TEXT(object), lines);
- gl_label_text_set_props (GL_LABEL_TEXT(object),
- font_family, font_size, font_weight,
- font_italic_flag,
- color, just);
+ gl_label_object_set_font_family (GL_LABEL_OBJECT(object), font_family);
+ gl_label_object_set_font_size (GL_LABEL_OBJECT(object), font_size);
+ gl_label_object_set_font_weight (GL_LABEL_OBJECT(object), font_weight);
+ gl_label_object_set_font_italic_flag (GL_LABEL_OBJECT(object), font_italic_flag);
+ gl_label_object_set_text_color (GL_LABEL_OBJECT(object), color);
+ gl_label_object_set_text_alignment (GL_LABEL_OBJECT(object), just);
gl_text_node_lines_free (&lines);
g_free (font_family);
fill_color = gl_xml_get_prop_uint (node, "fill_color", 0);
gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h);
- gl_label_box_set_line_width (GL_LABEL_BOX(object), line_width);
- gl_label_box_set_line_color (GL_LABEL_BOX(object), line_color);
- gl_label_box_set_fill_color (GL_LABEL_BOX(object), fill_color);
+ gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width);
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color);
+ gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), fill_color);
gl_debug (DEBUG_XML, "END");
line_color = gl_xml_get_prop_uint (node, "line_color", 0);
gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h);
- gl_label_line_set_line_width (GL_LABEL_LINE(object), line_width);
- gl_label_line_set_line_color (GL_LABEL_LINE(object), line_color);
+ gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width);
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color);
gl_debug (DEBUG_XML, "END");
fill_color = gl_xml_get_prop_uint (node, "fill_color", 0);
gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h);
- gl_label_ellipse_set_line_width (GL_LABEL_ELLIPSE(object), line_width);
- gl_label_ellipse_set_line_color (GL_LABEL_ELLIPSE(object), line_color);
- gl_label_ellipse_set_fill_color (GL_LABEL_ELLIPSE(object), fill_color);
+ gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width);
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color);
+ gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), fill_color);
gl_debug (DEBUG_XML, "END");
gl_label_barcode_set_data (GL_LABEL_BARCODE(object), text_node);
gl_label_barcode_set_props (GL_LABEL_BARCODE(object),
- style, text_flag, checksum_flag, color);
+ style, text_flag, checksum_flag);
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object), color);
gl_text_node_free (&text_node);
/* line attrs */
line_width = gl_xml_get_prop_length (node, "line_width", 1.0);
line_color = gl_xml_get_prop_uint (node, "line_color", 0);
- gl_label_box_set_line_width (GL_LABEL_BOX(object), line_width);
- gl_label_box_set_line_color (GL_LABEL_BOX(object), line_color);
+ gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width);
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color);
/* fill attrs */
fill_color = gl_xml_get_prop_uint (node, "fill_color", 0);
- gl_label_box_set_fill_color (GL_LABEL_BOX(object), fill_color);
+ gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), fill_color);
/* affine attrs */
affine[0] = gl_xml_get_prop_double (node, "a0", 0.0);
/* line attrs */
line_width = gl_xml_get_prop_length (node, "line_width", 1.0);
line_color = gl_xml_get_prop_uint (node, "line_color", 0);
- gl_label_ellipse_set_line_width (GL_LABEL_ELLIPSE(object), line_width);
- gl_label_ellipse_set_line_color (GL_LABEL_ELLIPSE(object), line_color);
+ gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width);
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color);
/* fill attrs */
fill_color = gl_xml_get_prop_uint (node, "fill_color", 0);
- gl_label_ellipse_set_fill_color (GL_LABEL_ELLIPSE(object), fill_color);
+ gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), fill_color);
/* affine attrs */
affine[0] = gl_xml_get_prop_double (node, "a0", 0.0);
/* line attrs */
line_width = gl_xml_get_prop_length (node, "line_width", 1.0);
line_color = gl_xml_get_prop_uint (node, "line_color", 0);
- gl_label_line_set_line_width (GL_LABEL_LINE(object), line_width);
- gl_label_line_set_line_color (GL_LABEL_LINE(object), line_color);
+ gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width);
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color);
/* affine attrs */
affine[0] = gl_xml_get_prop_double (node, "a0", 0.0);
checksum_flag = gl_xml_get_prop_boolean (node, "checksum", TRUE);
color = gl_xml_get_prop_uint (node, "color", 0);
gl_label_barcode_set_props (GL_LABEL_BARCODE(object),
- style, text_flag, checksum_flag, color);
+ style, text_flag, checksum_flag);
+ gl_label_object_set_line_color (GL_LABEL_OBJECT(object), color);
/* data or field attr */
string = xmlGetProp (node, "data");
gl_xml_set_prop_length (node, "h", h);
/* justify attr */
- just = gl_label_text_get_text_alignment (GL_LABEL_TEXT(object));
+ just = gl_label_object_get_text_alignment (object);
xmlSetProp (node, "justify", gl_util_just_to_string (just));
/* affine attrs */
gl_xml_set_prop_length (node, "h", h);
/* line attrs */
- line_width = gl_label_box_get_line_width (GL_LABEL_BOX(object));
- line_color = gl_label_box_get_line_color (GL_LABEL_BOX(object));
+ line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object));
+ line_color = gl_label_object_get_line_color (GL_LABEL_OBJECT(object));
gl_xml_set_prop_length (node, "line_width", line_width);
gl_xml_set_prop_uint_hex (node, "line_color", line_color);
/* fill attrs */
- fill_color = gl_label_box_get_fill_color (GL_LABEL_BOX(object));
+ fill_color = gl_label_object_get_fill_color (GL_LABEL_OBJECT(object));
gl_xml_set_prop_uint_hex (node, "fill_color", fill_color);
/* affine attrs */
gl_xml_set_prop_length (node, "h", h);
/* line attrs */
- line_width = gl_label_ellipse_get_line_width (GL_LABEL_ELLIPSE(object));
- line_color = gl_label_ellipse_get_line_color (GL_LABEL_ELLIPSE(object));
+ line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object));
+ line_color = gl_label_object_get_line_color (GL_LABEL_OBJECT(object));
gl_xml_set_prop_length (node, "line_width", line_width);
gl_xml_set_prop_uint_hex (node, "line_color", line_color);
/* fill attrs */
- fill_color = gl_label_ellipse_get_fill_color (GL_LABEL_ELLIPSE(object));
+ fill_color = gl_label_object_get_fill_color (GL_LABEL_OBJECT(object));
gl_xml_set_prop_uint_hex (node, "fill_color", fill_color);
/* affine attrs */
gl_xml_set_prop_length (node, "dy", dy);
/* line attrs */
- line_width = gl_label_line_get_line_width (GL_LABEL_LINE(object));
- line_color = gl_label_line_get_line_color (GL_LABEL_LINE(object));
+ line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object));
+ line_color = gl_label_object_get_line_color (GL_LABEL_OBJECT(object));
gl_xml_set_prop_length (node, "line_width", line_width);
gl_xml_set_prop_uint_hex (node, "line_color", line_color);
/* Barcode properties attrs */
gl_label_barcode_get_props (GL_LABEL_BARCODE(object),
- &style, &text_flag, &checksum_flag, &color);
+ &style, &text_flag, &checksum_flag);
+ color = gl_label_object_get_line_color (GL_LABEL_OBJECT(object));
xmlSetProp (node, "style", gl_barcode_style_to_text (style));
gl_xml_set_prop_boolean (node, "text", text_flag);
gl_xml_set_prop_boolean (node, "checksum", checksum_flag);
node = xmlNewChild (root, ns, "Span", NULL);
/* All span attrs at top level. */
- gl_label_text_get_props (GL_LABEL_TEXT(object_text),
- &font_family, &font_size, &font_weight,
- &font_italic_flag,
- &color, &just);
+ font_family = gl_label_object_get_font_family (GL_LABEL_OBJECT(object_text));
+ font_size = gl_label_object_get_font_size (GL_LABEL_OBJECT(object_text));
+ font_weight = gl_label_object_get_font_weight (GL_LABEL_OBJECT(object_text));
+ font_italic_flag = gl_label_object_get_font_italic_flag (GL_LABEL_OBJECT(object_text));
+ color = gl_label_object_get_text_color (GL_LABEL_OBJECT(object_text));
+ just = gl_label_object_get_text_alignment (GL_LABEL_OBJECT(object_text));
xmlSetProp (node, "font_family", font_family);
gl_xml_set_prop_double (node, "font_size", font_size);
xmlSetProp (node, "font_weight", gl_util_weight_to_string (font_weight));