return point;
}
+/**
+ * rpt_common_rptpoint_new_with_values:
+ * @x:
+ * @y:
+ *
+ * Returns: an new allocated #RptPoint struct.
+ */
+RptPoint
+*rpt_common_rptpoint_new_with_values (gdouble x, gdouble y)
+{
+ RptPoint *point;
+
+ point = rpt_common_rptpoint_new ();
+ point->x = x;
+ point->y = y;
+
+ return point;
+}
+
/**
* rpt_common_get_position:
* @xnode: an #xmlNode.
return size;
}
+/**
+ * rpt_common_rptsize_new_with_values:
+ * @width:
+ * @height:
+ *
+ * Returns: an new allocated #RptSize struct.
+ */
+RptSize
+*rpt_common_rptsize_new_with_values (gdouble width, gdouble height)
+{
+ RptSize *size;
+
+ size = rpt_common_rptsize_new ();
+ size->width = width;
+ size->height = height;
+
+ return size;
+}
+
/**
* rpt_common_get_size:
* @xnode: an #xmlNode.
height = xmlGetProp (xnode, (const xmlChar *)"height");
if (width != NULL && height != NULL)
{
- size = rpt_common_rptsize_new ();
- size->width = strtod (width, NULL);
- size->height = strtod (height, NULL);
+ size = rpt_common_rptsize_new_with_values (g_strtod (width, NULL),
+ g_strtod (height, NULL));
}
return size;
return rotation;
}
+/**
+ * rpt_common_rptrotation_new_with_values:
+ * @angle:
+ *
+ * Returns: an new allocated #RptRotation struct.
+ */
+RptRotation
+*rpt_common_rptrotation_new_with_values (gdouble angle)
+{
+ RptRotation *rotation;
+
+ rotation = rpt_common_rptrotation_new ();
+ rotation->angle = angle;
+
+ return rotation;
+}
+
/**
* rpt_common_get_rotation:
* @xnode: an #xmlNode.
return margin;
}
+/**
+ * rpt_common_rptmargin_new_with_values:
+ * @top:
+ * @right:
+ * @bottom:
+ * @left:
+ *
+ * Returns: an new allocated #RptMargin struct.
+ */
+RptMargin
+*rpt_common_rptmargin_new_with_values (gdouble top,
+ gdouble right,
+ gdouble bottom,
+ gdouble left)
+{
+ RptMargin *margin;
+
+ margin = rpt_common_rptmargin_new ();
+ margin->top = top;
+ margin->right = right;
+ margin->bottom = bottom;
+ margin->left = left;
+
+ return margin;
+}
+
/**
* rpt_common_get_margin:
* @xnode: an #xmlNode.
const gchar *rpt_common_enum_to_stroutputtype (eRptOutputType output_type);
RptPoint *rpt_common_rptpoint_new (void);
+RptPoint *rpt_common_rptpoint_new_with_values (gdouble x, gdouble y);
RptPoint *rpt_common_get_position (xmlNode *xnode);
void rpt_common_set_position (xmlNode *xnode,
const RptPoint *position);
RptSize *rpt_common_rptsize_new (void);
+RptSize *rpt_common_rptsize_new_with_values (gdouble width, gdouble height);
RptSize *rpt_common_get_size (xmlNode *xnode);
void rpt_common_set_size (xmlNode *xnode,
const RptSize *size);
RptRotation *rpt_common_rptrotation_new (void);
+RptRotation *rpt_common_rptrotation_new_with_values (gdouble angle);
RptRotation *rpt_common_get_rotation (xmlNode *xnode);
void rpt_common_set_rotation (xmlNode *xnode,
const RptRotation *rotation);
RptMargin *rpt_common_rptmargin_new (void);
+RptMargin *rpt_common_rptmargin_new_with_values (gdouble top,
+ gdouble right,
+ gdouble bottom,
+ gdouble left);
RptMargin *rpt_common_get_margin (xmlNode *xnode);
void rpt_common_set_margin (xmlNode *xnode,
const RptMargin *margin);