Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
82da744c
Commit
82da744c
authored
Apr 03, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply the same logic as in
2b00ea6a
to zoom initialization (#520)
parent
d68ff6ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
panel.py
printrun/gl/panel.py
+6
-4
No files found.
printrun/gl/panel.py
View file @
82da744c
...
@@ -203,11 +203,13 @@ class wxGLPanel(wx.Panel):
...
@@ -203,11 +203,13 @@ class wxGLPanel(wx.Panel):
glLoadIdentity
()
glLoadIdentity
()
self
.
setup_lights
()
self
.
setup_lights
()
if
self
.
orthographic
:
if
self
.
orthographic
:
ratio
=
factor
*
float
(
min
(
self
.
width
,
self
.
height
))
/
self
.
dist
wratio
=
self
.
width
/
self
.
dist
hratio
=
self
.
height
/
self
.
dist
minratio
=
float
(
min
(
wratio
,
hratio
))
self
.
zoom_factor
=
1.0
self
.
zoom_factor
=
1.0
self
.
zoomed_width
=
1.0
self
.
zoomed_width
=
wratio
/
minratio
self
.
zoomed_height
=
1.0
self
.
zoomed_height
=
hratio
/
minratio
glScalef
(
ratio
,
ratio
,
1
)
glScalef
(
factor
*
minratio
,
factor
*
min
ratio
,
1
)
def
OnDraw
(
self
,
*
args
,
**
kwargs
):
def
OnDraw
(
self
,
*
args
,
**
kwargs
):
"""Draw the window."""
"""Draw the window."""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment