Commit 40e7c1f4 authored by Dom Lachowicz's avatar Dom Lachowicz

bug 147662

parent 8541d92e
2004-07-17 Dom Lachowicz <cinamod@hotmail.com>
* rsvg.[ch]: Bug #147662
2004-07-17 Caleb Moore <c.moore@student.unsw.edu.au>
* rsvg-shapes.c: rewrote some of the image code so it transforms the image correctly, pitty about loosing bilinear filtering, but we can get that back I suppose
......
......@@ -37,10 +37,10 @@ Core API
</para>
@dpi:
<!-- # Unused Parameters # -->
@dpi_x:
@dpi_y:
<!-- # Unused Parameters # -->
@dpi:
<!-- ##### FUNCTION rsvg_handle_new ##### -->
......@@ -57,10 +57,10 @@ Core API
</para>
@handle:
@dpi:
<!-- # Unused Parameters # -->
@dpi_x:
@dpi_y:
<!-- # Unused Parameters # -->
@dpi:
<!-- ##### FUNCTION rsvg_handle_set_size_callback ##### -->
......
......@@ -1571,7 +1571,7 @@ rsvg_handle_init (RsvgHandle * handle)
}
/**
* rsvg_set_default_dpi
* rsvg_set_default_dpi_x_y
* @dpi_x: Dots Per Inch (aka Pixels Per Inch)
* @dpi_y: Dots Per Inch (aka Pixels Per Inch)
*
......@@ -1579,10 +1579,10 @@ rsvg_handle_init (RsvgHandle * handle)
* 72, 90, and 300 DPI. Passing a number <= 0 to #dpi will
* reset the DPI to whatever the default value happens to be.
*
* Since: 2.2
* Since: 2.8
*/
void
rsvg_set_default_dpi (double dpi_x, double dpi_y)
rsvg_set_default_dpi_x_y (double dpi_x, double dpi_y)
{
if (dpi_x <= 0.)
internal_dpi_x = RSVG_DEFAULT_DPI_X;
......@@ -1596,7 +1596,24 @@ rsvg_set_default_dpi (double dpi_x, double dpi_y)
}
/**
* rsvg_handle_set_dpi
* rsvg_set_default_dpi
* @dpi: Dots Per Inch (aka Pixels Per Inch)
*
* Sets the DPI for the all future outgoing pixbufs. Common values are
* 72, 90, and 300 DPI. Passing a number <= 0 to #dpi will
* reset the DPI to whatever the default value happens to be.
*
* Since: 2.2
* DEPRECATED. Use rsvg_set_default_dpi_x_y() instead
*/
void
rsvg_set_default_dpi (double dpi)
{
rsvg_set_default_dpi_x_y (dpi, dpi);
}
/**
* rsvg_handle_set_dpi_x_y
* @handle: An #RsvgHandle
* @dpi_x: Dots Per Inch (aka Pixels Per Inch)
* @dpi_y: Dots Per Inch (aka Pixels Per Inch)
......@@ -1605,10 +1622,10 @@ rsvg_set_default_dpi (double dpi_x, double dpi_y)
* 72, 90, and 300 DPI. Passing a number <= 0 to #dpi will
* reset the DPI to whatever the default value happens to be.
*
* Since: 2.2
* Since: 2.8
*/
void
rsvg_handle_set_dpi (RsvgHandle * handle, double dpi_x, double dpi_y)
rsvg_handle_set_dpi_x_y (RsvgHandle * handle, double dpi_x, double dpi_y)
{
g_return_if_fail (handle != NULL);
......@@ -1623,6 +1640,24 @@ rsvg_handle_set_dpi (RsvgHandle * handle, double dpi_x, double dpi_y)
handle->dpi_y = dpi_y;
}
/**
* rsvg_handle_set_dpi
* @handle: An #RsvgHandle
* @dpi: Dots Per Inch (aka Pixels Per Inch)
*
* Sets the DPI for the outgoing pixbuf. Common values are
* 72, 90, and 300 DPI. Passing a number <= 0 to #dpi will
* reset the DPI to whatever the default value happens to be.
*
* Since: 2.2
* DEPRECATED. Use rsvg_handle_set_dpi_x_y() instead
*/
void
rsvg_handle_set_dpi (RsvgHandle * handle, double dpi)
{
rsvg_handle_set_dpi_x_y (handle, dpi, dpi);
}
/**
* rsvg_handle_set_size_callback:
* @handle: An #RsvgHandle
......
......@@ -54,10 +54,15 @@ typedef void (* RsvgSizeFunc) (gint *width,
gpointer user_data);
void rsvg_set_default_dpi (double dpi_x, double dpi_y);
#ifndef RSVG_DISABLE_DEPRECATED
void rsvg_set_default_dpi (double dpi);
void rsvg_handle_set_dpi (RsvgHandle * handle, double dpi);
#endif
void rsvg_set_default_dpi_x_y (double dpi_x, double dpi_y);
void rsvg_handle_set_dpi_x_y (RsvgHandle * handle, double dpi_x, double dpi_y);
RsvgHandle *rsvg_handle_new (void);
void rsvg_handle_set_dpi (RsvgHandle * handle, double dpi_x, double dpi_y);
void rsvg_handle_set_size_callback (RsvgHandle *handle,
RsvgSizeFunc size_func,
gpointer user_data,
......
......@@ -533,7 +533,7 @@ main (int argc, char **argv)
/* initialize gtk+ */
gtk_init (&argc, &argv) ;
rsvg_set_default_dpi (dpi_x, dpi_y);
rsvg_set_default_dpi_x_y (dpi_x, dpi_y);
/* if both are unspecified, assume user wants to zoom the pixbuf in at least 1 dimension */
if (width == -1 && height == -1)
......
......@@ -94,7 +94,7 @@ main (int argc, const char **argv)
g_type_init ();
rsvg_set_default_dpi (dpi_x, dpi_y);
rsvg_set_default_dpi_x_y (dpi_x, dpi_y);
/* if both are unspecified, assume user wants to zoom the pixbuf in at least 1 dimension */
if (width == -1 && height == -1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment