Renamed arguments to width_in_pixels, height_in_pixels, x_in_pixels,

1999-12-13  Federico Mena Quintero  <federico@redhat.com>

	* gdk-pixbuf/gnome-canvas-pixbuf.c
	(gnome_canvas_pixbuf_class_init): Renamed arguments to
	width_in_pixels, height_in_pixels, x_in_pixels, y_in_pixels, for
	consistency with the new canvas.
	(PixbufPrivate): Do the same renaming in the structure fields, for
	consistency.

	* doc/tmpl/gnome-canvas-pixbuf.sgml: Updated for new argument names.
This commit is contained in:
Federico Mena Quintero 1999-12-08 21:17:52 +00:00 committed by Arturo Espinosa
parent e7b2454ce3
commit a70843bab2
2 changed files with 89 additions and 33 deletions

View File

@ -24,12 +24,15 @@ struct GdkPixbufModule {
gpointer (* begin_load) (ModulePreparedNotifyFunc prepare_func, ModuleUpdatedNotifyFunc update_func, gpointer user_data);
void (* stop_load) (gpointer context);
gboolean (* load_increment)(gpointer context, const gchar *buf, guint size);
/* Animation loading */
GdkPixbufAnimation *(* load_animation) (FILE *f);
};
</STRUCT>
<FUNCTION>
<NAME>gdk_pixbuf_get_module</NAME>
<RETURNS>GdkPixbufModule *</RETURNS>
gchar *buffer, gint size
gchar *buffer,gint size
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_load_module</NAME>
@ -79,17 +82,22 @@ void
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_loader_new</NAME>
<RETURNS>GdkPixbufLoader *</RETURNS>
<RETURNS>GdkPixbufLoader *</RETURNS>
void
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_loader_write</NAME>
<RETURNS>gboolean </RETURNS>
GdkPixbufLoader *loader, const gchar *buf, size_t count
GdkPixbufLoader *loader,const gchar *buf,size_t count
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_loader_get_pixbuf</NAME>
<RETURNS>GdkPixbuf *</RETURNS>
<RETURNS>GdkPixbuf *</RETURNS>
GdkPixbufLoader *loader
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_loader_get_animation</NAME>
<RETURNS>GdkPixbufAnimation *</RETURNS>
GdkPixbufLoader *loader
</FUNCTION>
<FUNCTION>
@ -101,8 +109,24 @@ GdkPixbufLoader *loader
<NAME>GdkPixbuf</NAME>
</STRUCT>
<STRUCT>
<NAME>GdkPixbufFrame</NAME>
</STRUCT>
<STRUCT>
<NAME>GdkPixbufAnimation</NAME>
</STRUCT>
<ENUM>
<NAME>GdkPixbufFrameAction</NAME>
typedef enum
{
GDK_PIXBUF_FRAME_RETAIN,
GDK_PIXBUF_FRAME_DISPOSE,
GDK_PIXBUF_FRAME_REVERT
} GdkPixbufFrameAction;
</ENUM>
<STRUCT>
<NAME>GdkPixbuf</NAME>
struct GdkPixbuf {
struct GdkPixbuf
{
/* Reference count */
int ref_count;
@ -110,6 +134,26 @@ struct GdkPixbuf {
ArtPixBuf *art_pixbuf;
};
</STRUCT>
<STRUCT>
<NAME>GdkPixbufFrame</NAME>
struct GdkPixbufFrame
{
GdkPixbuf *pixbuf;
gushort x_offset;
gushort y_offset;
guint delaytime;
GdkPixbufFrameAction action;
};
</STRUCT>
<STRUCT>
<NAME>GdkPixbufAnimation</NAME>
struct GdkPixbufAnimation
{
int n_frames;
GList *frames;
};
</STRUCT>
<FUNCTION>
<NAME>gdk_pixbuf_get_format</NAME>
<RETURNS>ArtPixFormat </RETURNS>
@ -173,17 +217,17 @@ ArtPixFormat format, gboolean has_alpha, int bits_per_sample,int width, int heig
<FUNCTION>
<NAME>gdk_pixbuf_new_from_file</NAME>
<RETURNS>GdkPixbuf *</RETURNS>
const char *filename
const char *filename
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_new_from_data</NAME>
<RETURNS>GdkPixbuf *</RETURNS>
guchar *data, ArtPixFormat format, gboolean has_alpha,int width, int height, int rowstride,ArtDestroyNotify dfunc, gpointer dfunc_data
guchar *data,ArtPixFormat format,gboolean has_alpha,int width, int height,int rowstride,ArtDestroyNotify dfunc,gpointer dfunc_data
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_new_from_xpm_data</NAME>
<RETURNS>GdkPixbuf *</RETURNS>
const gchar **data
const gchar **data
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_add_alpha</NAME>
@ -217,6 +261,16 @@ GdkPixbuf *pixbuf, GdkDrawable *drawable,int src_x, int src_y,int dest_x, int de
<RETURNS>GdkPixbuf *</RETURNS>
GdkPixbuf *dest,GdkDrawable *src, GdkColormap *cmap,int src_x, int src_y,int dest_x, int dest_y,int width, int height
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_animation_new_from_file</NAME>
<RETURNS>GdkPixbufAnimation *</RETURNS>
const char *filename
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_animation_destroy</NAME>
<RETURNS>void </RETURNS>
GdkPixbufAnimation *animation,gboolean free_frames
</FUNCTION>
<MACRO>
<NAME>GNOME_TYPE_CANVAS_PIXBUF</NAME>
#define GNOME_TYPE_CANVAS_PIXBUF (gnome_canvas_pixbuf_get_type ())

View File

@ -87,11 +87,13 @@ Canvas item to display #GdkPixbuf images.
Normally, the pixbuf item's translation and scaling arguments
are interpreted in units, so they will be modified by the item's
affine transformation. The <link
linkend="GnomeCanvasPixbuf--width-pixels">width_pixels</link>,
linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>,
<link
linkend="GnomeCanvasPixbuf--height-pixels">height_pixels</link>,
<link linkend="GnomeCanvasPixbuf--x-pixels">x_pixels</link>, and
<link linkend="GnomeCanvasPixbuf--y-pixels">y_pixels</link>
linkend="GnomeCanvasPixbuf--height-in-pixels">height_in_pixels</link>,
<link
linkend="GnomeCanvasPixbuf--x-in-pixels">x_in_pixels</link>, and
<link
linkend="GnomeCanvasPixbuf--y-in-pixels">y_in_pixels</link>
object arguments can be used to modify this behavior. If one of
these arguments is %TRUE, then the corresponding scaling or
translation value will not be affected lengthwise by the pixbuf
@ -102,11 +104,11 @@ Canvas item to display #GdkPixbuf images.
For example, consider a pixbuf item whose size is (300, 200).
If the item is modified with a scaling transformation of (0.5,
2.0) but the <link
linkend="GnomeCanvasPixbuf--width-pixels">width_pixels</link> is
set to %TRUE, then the item will appear to be (300, 400) pixels
in size. This means that in this case the item's affine
transformation only applies to the height value, while the
width value is kept in absolute pixels.
linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>
is set to %TRUE, then the item will appear to be (300, 400)
pixels in size. This means that in this case the item's affine
transformation only applies to the height value, while the width
value is kept in absolute pixels.
</para>
<para>
@ -122,11 +124,11 @@ Canvas item to display #GdkPixbuf images.
</para>
</footnote>. If the item is then modified by the same scaling
transformation of (0.5, 2.0) but the <link
linkend="GnomeCanvasPixbuf--y-pixels">y_pixels</link> argument
is set to %TRUE, then the image's upper-left corner will appear
to be at position (15, 40). In this case, the affine
transformation is applied only to the x offset, while the y
offset is kept in absolute pixels.
linkend="GnomeCanvasPixbuf--y-in-pixels">y_in_pixels</link>
argument is set to %TRUE, then the image's upper-left corner
will appear to be at position (15, 40). In this case, the
affine transformation is applied only to the x offset, while the
y offset is kept in absolute pixels.
</para>
<para>
@ -215,12 +217,12 @@ Canvas item to display #GdkPixbuf images.
will only be used if the <link
linkend="GnomeCanvasPixbuf--width-set">width_set</link> argument
is %TRUE. If the <link
linkend="GnomeCanvasPixbuf--width-pixels">width_pixels</link>
linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>
argument is %FALSE, the width will be taken to be in canvas units,
and thus will be scaled along with the canvas item's affine
transformation. If width_pixels is %TRUE, the width will be taken
to be in pixels, and will visually remain a constant size even if
the item's affine transformation changes.
transformation. If width_in_pixels is %TRUE, the width will be
taken to be in pixels, and will visually remain a constant size
even if the item's affine transformation changes.
</para>
<!-- ##### ARG GnomeCanvasPixbuf:width_set ##### -->
@ -232,7 +234,7 @@ Canvas item to display #GdkPixbuf images.
used instead. This argument is %FALSE by default.
</para>
<!-- ##### ARG GnomeCanvasPixbuf:width_pixels ##### -->
<!-- ##### ARG GnomeCanvasPixbuf:width_in_pixels ##### -->
<para>
If this argument is %TRUE, then the width of the pixbuf will be
considered to be in pixels, that is, it will not be visually
@ -261,10 +263,10 @@ Canvas item to display #GdkPixbuf images.
The default is %FALSE.
</para>
<!-- ##### ARG GnomeCanvasPixbuf:height_pixels ##### -->
<!-- ##### ARG GnomeCanvasPixbuf:height_in_pixels ##### -->
<para>
Works in the same way as the <link
linkend="GnomeCanvasPixbuf--width-pixels">width_pixels</link>
linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>
argument. The default is %FALSE.
</para>
@ -285,7 +287,7 @@ Canvas item to display #GdkPixbuf images.
coordinates.
</para>
<!-- ##### ARG GnomeCanvasPixbuf:x_pixels ##### -->
<!-- ##### ARG GnomeCanvasPixbuf:x_in_pixels ##### -->
<para>
If this argument is %TRUE, the pixbuf's translation with respect
to its logical origin in item-relative coordinates will be in
@ -312,11 +314,11 @@ Canvas item to display #GdkPixbuf images.
default is %FALSE.
</para>
<!-- ##### ARG GnomeCanvasPixbuf:y_pixels ##### -->
<!-- ##### ARG GnomeCanvasPixbuf:y_in_pixels ##### -->
<para>
Works in the same way as the <link
linkend="GnomeCanvasPixbuf--x-pixels">x_pixels</link> argument.
The default is %FALSE.
linkend="GnomeCanvasPixbuf--x-in-pixels">x_in_pixels</link>
argument. The default is %FALSE.
</para>
<!--