From: "Dolores Alia de Saravia" <loli unsa edu ar>
To: dia-list gnome org
Subject: Better with units
Date: Mon, 27 Aug 2001 07:31:45 -0300
Dia deals with three different length magnitudes:
--- one for paper, or printed diagram; unit: cm
--- one for canvas, or working diagram; unit without a name, it could
be "virtual cm", or simply "canvas_unit".
--- one for the window trough which we see part of the canvas; unit:
pixel.
I beleive it would be better (less confusing) to make the user aware
of the units.
If posible, I would try some changes:
in app/preferences.c of 28/07/01,
lines 143,144,145:
{ "new_view_width", PREF_UINT, PREF_OFFSET(new_view.width),
&default_int_w, 1, N_("Width:") },
{ "new_view_height", PREF_UINT, PREF_OFFSET(new_view.height),
&default_int_h, 1, N_("Height:") },
{ "new_view_zoom", PREF_UREAL, PREF_OFFSET(new_view.zoom),
&default_real_zoom, 1, N_("Magnify:") },
replace '"Width:"' with '"Width (pixels):"'
replace '"Height:"' with '"Height (pixels):")
replace '"Magnify:"' with '"Magnify (20/100 pixel/canvas_unit):"
( 20 corresponds to DDISPLAY_NORMAL_ZOOM defined in display.h of
21/08/01 in line 33
and also to DPCM defined in app/export_png.c of 23/03/01
in line 37)
lines 154,155
{ "grid_x", PREF_UREAL, PREF_OFFSET(grid.x), &default_real_one, 2,
N_("X Size:") },
{ "grid_y", PREF_UREAL, PREF_OFFSET(grid.y), &default_real_one, 2,
N_("Y Size:") },
replace '"X Size:"' with '"X Size (canvas_units):"'
replace '"Y Size:"' with '"Y Size (canvas_units):"'
In app/diapagelayout of 23/02/01,
line 259
self->scale = gtk_radio_button_new_with_label(NULL, _("Scale:"));
replace '"Scale:"' with '"Scale (1/100 cm/canvas_unit): "'
Maybe I would also change the following coments related to these things:
app/export_png.c of 23/03/01 line 35
/* the dots per centimetre to render this diagram at */
I would replace "dots" with "pixels" and "centimetre" with
"canvas_unit"
in app/display.c of 21/08/01
lines 303-318
/* Takes pixel length and returns real length */
real
ddisplay_untransform_length(DDisplay *ddisp, real len)
{
return len / ddisp->zoom_factor;
}
return len * ddisp->zoom_factor;
}
/* Takes pixel length and returns real length */
real
ddisplay_untransform_length(DDisplay *ddisp, real len)
{
return len / ddisp->zoom_factor;
}
I would replace "real length" with "canvas length"
Loli
email: loli@unsa.edu.ar
Sent using NeoMail, a web-based e-mail client.
http://neomail.sourceforge.net