Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
graphics
xfig
7e0157.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 7e0157.patch of Package xfig
From 7e0157b422b696d848c312aace78c89f3f914192 Mon Sep 17 00:00:00 2001 From: Thomas Loimer <thomas.loimer@tuwien.ac.at> Date: Mon, 2 Sep 2024 21:30:00 +0200 Subject: [PATCH] Correctly scale the example dimension line in the widget Draw the example dimension line into the correct position into its widget. Before, moving the canvas, probably changing the zoom, then entering line drawing mode and clicking on the dimension line widget in the indicator panel would not render the example line correctly. --- src/w_indpanel.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git src/w_indpanel.c src/w_indpanel.c index bde8298..5ab33f6 100644 --- src/w_indpanel.c +++ src/w_indpanel.c @@ -3091,6 +3091,9 @@ void draw_cur_dimline(void) F_compound *dimline_example; F_point *point; Boolean save_showlen, save_shownums; + int save_zoomxoff, save_zoomyoff; + float save_zoomscale; + float save_display_zoomscale; static Pixmap dimline_examp_pixmap = (Pixmap)0; /* make the a dimension line */ @@ -3126,6 +3129,14 @@ void draw_cur_dimline(void) save_showlen = appres.showlengths; save_shownums = appres.shownums; appres.showlengths = appres.shownums = False; + /* and draw at scale 1 into the correct position */ + save_zoomxoff = zoomxoff; + save_zoomyoff = zoomyoff; + save_zoomscale = zoomscale; + save_display_zoomscale = display_zoomscale; + zoomxoff = zoomyoff = 0; + display_zoomscale = 1.0f; + zoomscale = display_zoomscale / ZOOM_FACTOR; /* now draw it into our pixmap */ canvas_win = (Window)dimline_examp_pixmap; @@ -3157,6 +3168,10 @@ void draw_cur_dimline(void) /* and the showlengths and shownums settings */ appres.showlengths = save_showlen; appres.shownums = save_shownums; + zoomxoff = save_zoomxoff; + zoomyoff = save_zoomyoff; + zoomscale = save_zoomscale; + display_zoomscale = save_display_zoomscale; preview_in_progress = False; /* fool the toolkit... you know the drill by now */ -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor