Commit 8c176f1a authored by Andy Hertzfeld's avatar Andy Hertzfeld
Browse files

made it respect the scale factor by removing code from


       made it respect the scale factor by removing code from compute_viewport_affine
       that was defeating it.
parent c9692eff
2000-01-27 Andy Hertzfeld <andy@eazel.com>
* libnautilus/nautilus-icons-view-icon-item.c:
made the canvas item respect the scale factor by removing code in
compute_viewport_affine that was defeating it. There's still a
bunch more to do to make it right for non-unity scale factors, but
at least we can start that now.
2000-01-27 Andy Hertzfeld <andy@eazel.com>
hooked zooming up to the background context menu; right now the canvas item
......
......@@ -464,37 +464,11 @@ compute_viewport_affine (NautilusIconsViewIconItem *icon_view_item, double *view
x = priv->x;
y = priv->y;
/* Convert i_len and j_len into scaling factors */
si_len = w / priv->pixbuf->art_pixbuf->width;
sj_len = h / priv->pixbuf->art_pixbuf->height;
if (i_len > GNOME_CANVAS_EPSILON)
si_len = 1.0 / i_len;
else
si_len = 0.0;
si_len *= w / priv->pixbuf->art_pixbuf->width;
if (j_len > GNOME_CANVAS_EPSILON)
sj_len = 1.0 / j_len;
else
sj_len = 0.0;
sj_len *= h / priv->pixbuf->art_pixbuf->height;
/* Calculate translation offsets */
if (i_len > GNOME_CANVAS_EPSILON)
ti_len = 1.0 / i_len;
else
ti_len = 0.0;
ti_len *= x;
if (j_len > GNOME_CANVAS_EPSILON)
tj_len = 1.0 / j_len;
else
tj_len = 0.0;
tj_len *= y;
ti_len = x;
tj_len = y;
/* Compute the final affine */
......
......@@ -464,37 +464,11 @@ compute_viewport_affine (NautilusIconsViewIconItem *icon_view_item, double *view
x = priv->x;
y = priv->y;
/* Convert i_len and j_len into scaling factors */
si_len = w / priv->pixbuf->art_pixbuf->width;
sj_len = h / priv->pixbuf->art_pixbuf->height;
if (i_len > GNOME_CANVAS_EPSILON)
si_len = 1.0 / i_len;
else
si_len = 0.0;
si_len *= w / priv->pixbuf->art_pixbuf->width;
if (j_len > GNOME_CANVAS_EPSILON)
sj_len = 1.0 / j_len;
else
sj_len = 0.0;
sj_len *= h / priv->pixbuf->art_pixbuf->height;
/* Calculate translation offsets */
if (i_len > GNOME_CANVAS_EPSILON)
ti_len = 1.0 / i_len;
else
ti_len = 0.0;
ti_len *= x;
if (j_len > GNOME_CANVAS_EPSILON)
tj_len = 1.0 / j_len;
else
tj_len = 0.0;
tj_len *= y;
ti_len = x;
tj_len = y;
/* Compute the final affine */
......
......@@ -464,37 +464,11 @@ compute_viewport_affine (NautilusIconsViewIconItem *icon_view_item, double *view
x = priv->x;
y = priv->y;
/* Convert i_len and j_len into scaling factors */
si_len = w / priv->pixbuf->art_pixbuf->width;
sj_len = h / priv->pixbuf->art_pixbuf->height;
if (i_len > GNOME_CANVAS_EPSILON)
si_len = 1.0 / i_len;
else
si_len = 0.0;
si_len *= w / priv->pixbuf->art_pixbuf->width;
if (j_len > GNOME_CANVAS_EPSILON)
sj_len = 1.0 / j_len;
else
sj_len = 0.0;
sj_len *= h / priv->pixbuf->art_pixbuf->height;
/* Calculate translation offsets */
if (i_len > GNOME_CANVAS_EPSILON)
ti_len = 1.0 / i_len;
else
ti_len = 0.0;
ti_len *= x;
if (j_len > GNOME_CANVAS_EPSILON)
tj_len = 1.0 / j_len;
else
tj_len = 0.0;
tj_len *= y;
ti_len = x;
tj_len = y;
/* Compute the final affine */
......
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