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
261a09c4
Commit
261a09c4
authored
Nov 07, 2011
by
Duane Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed that the background was repainted as white instead of transparent
parent
8b56bbe5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
bufferedcanvas.py
bufferedcanvas.py
+2
-0
xybuttons.py
xybuttons.py
+6
-1
zbuttons.py
zbuttons.py
+6
-3
No files found.
bufferedcanvas.py
View file @
261a09c4
...
...
@@ -111,6 +111,8 @@ class BufferedCanvas(wx.Panel):
Causes the canvas to be updated.
"""
dc
=
wx
.
MemoryDC
()
width
,
height
=
self
.
GetClientSizeTuple
()
self
.
backbuffer
=
wx
.
EmptyBitmap
(
width
,
height
)
dc
.
SelectObject
(
self
.
backbuffer
)
dc
.
BeginDrawing
()
self
.
draw
(
dc
)
...
...
xybuttons.py
View file @
261a09c4
...
...
@@ -60,6 +60,7 @@ class XYButtons(BufferedCanvas):
self
.
Bind
(
wx
.
EVT_LEFT_DOWN
,
self
.
OnLeftDown
)
self
.
Bind
(
wx
.
EVT_LEFT_DCLICK
,
self
.
OnLeftDown
)
self
.
Bind
(
wx
.
EVT_MOTION
,
self
.
OnMotion
)
self
.
Bind
(
wx
.
EVT_LEAVE_WINDOW
,
self
.
OnLeaveWindow
)
parent
.
Bind
(
wx
.
EVT_CHAR_HOOK
,
self
.
onKey
)
def
onKey
(
self
,
evt
):
...
...
@@ -156,6 +157,11 @@ class XYButtons(BufferedCanvas):
else
:
self
.
setKeypadIndex
(
idx
)
def
OnLeaveWindow
(
self
,
evt
):
self
.
quadrant
=
None
self
.
concentric
=
None
self
.
update
()
def
drawPartialPie
(
self
,
dc
,
center
,
r1
,
r2
,
angle1
,
angle2
):
parts
=
64
angle_dist
=
angle2
-
angle1
...
...
@@ -205,7 +211,6 @@ class XYButtons(BufferedCanvas):
self
.
drawPartialPie
(
dc
,
center
,
r1
-
inner_ring_radius
,
r2
-
inner_ring_radius
,
a1
+
fudge
,
a2
-
fudge
)
def
draw
(
self
,
dc
):
dc
.
Clear
()
center
=
wx
.
Point
(
XYButtons
.
center
[
0
],
XYButtons
.
center
[
1
])
dc
.
SetPen
(
wx
.
Pen
(
wx
.
Colour
(
100
,
100
,
100
,
172
),
4
))
...
...
zbuttons.py
View file @
261a09c4
...
...
@@ -29,6 +29,7 @@ class ZButtons(BufferedCanvas):
self
.
Bind
(
wx
.
EVT_LEFT_DOWN
,
self
.
OnLeftDown
)
self
.
Bind
(
wx
.
EVT_LEFT_DCLICK
,
self
.
OnLeftDown
)
self
.
Bind
(
wx
.
EVT_MOTION
,
self
.
OnMotion
)
self
.
Bind
(
wx
.
EVT_LEAVE_WINDOW
,
self
.
OnLeaveWindow
)
def
lookupRange
(
self
,
ydist
):
idx
=
-
1
...
...
@@ -79,10 +80,12 @@ class ZButtons(BufferedCanvas):
if
self
.
homeCallback
:
self
.
homeCallback
()
def
draw
(
self
,
dc
):
dc
.
Clear
()
# center = wx.Point(XYButtons.center[0], XYButtons.center[1])
def
OnLeaveWindow
(
self
,
evt
):
self
.
range
=
None
self
.
direction
=
None
self
.
update
()
def
draw
(
self
,
dc
):
dc
.
SetPen
(
wx
.
Pen
(
wx
.
Colour
(
100
,
100
,
100
,
172
),
4
))
dc
.
SetBrush
(
wx
.
Brush
(
wx
.
Colour
(
0
,
0
,
0
,
128
)))
...
...
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