fixed display of distance in the info window
--Sven
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
Mon Aug 23 19:55:48 MEST 1999 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* app/measure.c: fixed display of distance in the info window
|
||||||
|
|
||||||
Mon Aug 23 10:37:24 EDT 1999 Austin Donnelly <austin@gimp.org>
|
Mon Aug 23 10:37:24 EDT 1999 Austin Donnelly <austin@gimp.org>
|
||||||
|
|
||||||
* gimprc.5.in: add docs for %Dx image-title-format string.
|
* gimprc.5.in: add docs for %Dx image-title-format string.
|
||||||
|
@ -440,8 +440,10 @@ measure_tool_motion (Tool *tool,
|
|||||||
gimp_unit_get_symbol (gdisp->gimage->unit),
|
gimp_unit_get_symbol (gdisp->gimage->unit),
|
||||||
_("degrees"));
|
_("degrees"));
|
||||||
|
|
||||||
distance = sqrt (SQR ((double)(ax - bx) / gdisp->gimage->xresolution) +
|
distance = gimp_unit_get_factor (gdisp->gimage->unit) *
|
||||||
SQR ((double)(ay - by) / gdisp->gimage->yresolution));
|
sqrt (SQR ((double)(ax - bx) / gdisp->gimage->xresolution) +
|
||||||
|
SQR ((double)(ay - by) / gdisp->gimage->yresolution));
|
||||||
|
|
||||||
measure_tool->angle1 = measure_get_angle (ax, ay,
|
measure_tool->angle1 = measure_get_angle (ax, ay,
|
||||||
gdisp->gimage->xresolution,
|
gdisp->gimage->xresolution,
|
||||||
gdisp->gimage->yresolution);
|
gdisp->gimage->yresolution);
|
||||||
@ -452,8 +454,7 @@ measure_tool_motion (Tool *tool,
|
|||||||
if (angle > 180.0)
|
if (angle > 180.0)
|
||||||
angle = fabs (360.0 - angle);
|
angle = fabs (360.0 - angle);
|
||||||
|
|
||||||
g_snprintf (status_str, STATUSBAR_SIZE, format_str,
|
g_snprintf (status_str, STATUSBAR_SIZE, format_str, distance , angle);
|
||||||
distance * gimp_unit_get_factor (gdisp->gimage->unit), angle);
|
|
||||||
g_free (format_str);
|
g_free (format_str);
|
||||||
|
|
||||||
if (measure_tool_options)
|
if (measure_tool_options)
|
||||||
|
@ -440,8 +440,10 @@ measure_tool_motion (Tool *tool,
|
|||||||
gimp_unit_get_symbol (gdisp->gimage->unit),
|
gimp_unit_get_symbol (gdisp->gimage->unit),
|
||||||
_("degrees"));
|
_("degrees"));
|
||||||
|
|
||||||
distance = sqrt (SQR ((double)(ax - bx) / gdisp->gimage->xresolution) +
|
distance = gimp_unit_get_factor (gdisp->gimage->unit) *
|
||||||
SQR ((double)(ay - by) / gdisp->gimage->yresolution));
|
sqrt (SQR ((double)(ax - bx) / gdisp->gimage->xresolution) +
|
||||||
|
SQR ((double)(ay - by) / gdisp->gimage->yresolution));
|
||||||
|
|
||||||
measure_tool->angle1 = measure_get_angle (ax, ay,
|
measure_tool->angle1 = measure_get_angle (ax, ay,
|
||||||
gdisp->gimage->xresolution,
|
gdisp->gimage->xresolution,
|
||||||
gdisp->gimage->yresolution);
|
gdisp->gimage->yresolution);
|
||||||
@ -452,8 +454,7 @@ measure_tool_motion (Tool *tool,
|
|||||||
if (angle > 180.0)
|
if (angle > 180.0)
|
||||||
angle = fabs (360.0 - angle);
|
angle = fabs (360.0 - angle);
|
||||||
|
|
||||||
g_snprintf (status_str, STATUSBAR_SIZE, format_str,
|
g_snprintf (status_str, STATUSBAR_SIZE, format_str, distance , angle);
|
||||||
distance * gimp_unit_get_factor (gdisp->gimage->unit), angle);
|
|
||||||
g_free (format_str);
|
g_free (format_str);
|
||||||
|
|
||||||
if (measure_tool_options)
|
if (measure_tool_options)
|
||||||
|
@ -440,8 +440,10 @@ measure_tool_motion (Tool *tool,
|
|||||||
gimp_unit_get_symbol (gdisp->gimage->unit),
|
gimp_unit_get_symbol (gdisp->gimage->unit),
|
||||||
_("degrees"));
|
_("degrees"));
|
||||||
|
|
||||||
distance = sqrt (SQR ((double)(ax - bx) / gdisp->gimage->xresolution) +
|
distance = gimp_unit_get_factor (gdisp->gimage->unit) *
|
||||||
SQR ((double)(ay - by) / gdisp->gimage->yresolution));
|
sqrt (SQR ((double)(ax - bx) / gdisp->gimage->xresolution) +
|
||||||
|
SQR ((double)(ay - by) / gdisp->gimage->yresolution));
|
||||||
|
|
||||||
measure_tool->angle1 = measure_get_angle (ax, ay,
|
measure_tool->angle1 = measure_get_angle (ax, ay,
|
||||||
gdisp->gimage->xresolution,
|
gdisp->gimage->xresolution,
|
||||||
gdisp->gimage->yresolution);
|
gdisp->gimage->yresolution);
|
||||||
@ -452,8 +454,7 @@ measure_tool_motion (Tool *tool,
|
|||||||
if (angle > 180.0)
|
if (angle > 180.0)
|
||||||
angle = fabs (360.0 - angle);
|
angle = fabs (360.0 - angle);
|
||||||
|
|
||||||
g_snprintf (status_str, STATUSBAR_SIZE, format_str,
|
g_snprintf (status_str, STATUSBAR_SIZE, format_str, distance , angle);
|
||||||
distance * gimp_unit_get_factor (gdisp->gimage->unit), angle);
|
|
||||||
g_free (format_str);
|
g_free (format_str);
|
||||||
|
|
||||||
if (measure_tool_options)
|
if (measure_tool_options)
|
||||||
|
Reference in New Issue
Block a user