Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EO Time Series Viewer
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin Jakimow
EO Time Series Viewer
Commits
f5435b77
Commit
f5435b77
authored
11 years ago
by
Luke Campagnola
Browse files
Options
Downloads
Patches
Plain Diff
Fixed ScatterPlotItem.renderSymbol device argument
parent
3d820400
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyqtgraph/graphicsItems/ScatterPlotItem.py
+6
-14
6 additions, 14 deletions
pyqtgraph/graphicsItems/ScatterPlotItem.py
with
6 additions
and
14 deletions
pyqtgraph/graphicsItems/ScatterPlotItem.py
+
6
−
14
View file @
f5435b77
...
...
@@ -53,25 +53,17 @@ def renderSymbol(symbol, size, pen, brush, device=None):
the symbol will be rendered into the device specified (See QPainter documentation
for more information).
"""
## see if this pixmap is already cached
#global SymbolPixmapCache
#key = (symbol, size, fn.colorTuple(pen.color()), pen.width(), pen.style(), fn.colorTuple(brush.color()))
#if key in SymbolPixmapCache:
#return SymbolPixmapCache[key]
## Render a spot with the given parameters to a pixmap
penPxWidth
=
max
(
np
.
ceil
(
pen
.
widthF
()),
1
)
image
=
QtGui
.
QImage
(
int
(
size
+
penPxWidth
),
int
(
size
+
penPxWidth
),
QtGui
.
QImage
.
Format_ARGB32
)
image
.
fill
(
0
)
p
=
QtGui
.
QPainter
(
image
)
if
device
is
None
:
device
=
QtGui
.
QImage
(
int
(
size
+
penPxWidth
),
int
(
size
+
penPxWidth
),
QtGui
.
QImage
.
Format_ARGB32
)
device
.
fill
(
0
)
p
=
QtGui
.
QPainter
(
device
)
p
.
setRenderHint
(
p
.
Antialiasing
)
p
.
translate
(
imag
e
.
width
()
*
0.5
,
imag
e
.
height
()
*
0.5
)
p
.
translate
(
devic
e
.
width
()
*
0.5
,
devic
e
.
height
()
*
0.5
)
drawSymbol
(
p
,
symbol
,
size
,
pen
,
brush
)
p
.
end
()
return
image
#pixmap = QtGui.QPixmap(image)
#SymbolPixmapCache[key] = pixmap
#return pixmap
return
device
def
makeSymbolPixmap
(
size
,
pen
,
brush
,
symbol
):
## deprecated
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment