SkyQPainter
#include <skyqpainter.h>
Static Public Member Functions | |
static void | initStarImages () |
static void | releaseImageCache () |
Detailed Description
The QPainter-based painting backend.
This class implements the SkyPainter interface using a QPainter. For documentation,
- See also
- SkyPainter.
Definition at line 30 of file skyqpainter.h.
Constructor & Destructor Documentation
◆ SkyQPainter() [1/3]
SkyQPainter::SkyQPainter | ( | QPaintDevice * | pd, |
const QSize & | canvasSize ) |
Creates a SkyQPainter with the given QPaintDevice and uses the dimensions of the paint device as canvas dimensions.
- Parameters
-
pd the painting device. Cannot be 0 canvasSize the size of the canvas
Definition at line 119 of file skyqpainter.cpp.
◆ SkyQPainter() [2/3]
|
explicit |
Creates a SkyQPainter with the given QPaintDevice and given canvas size.
- Parameters
-
pd the painting device. Cannot be 0
Definition at line 111 of file skyqpainter.cpp.
◆ SkyQPainter() [3/3]
|
explicit |
Creates a SkyQPainter given a QWidget and an optional QPaintDevice.
- Parameters
-
widget the QWidget that provides the canvas size, and also the paint device unless pd
is specifiedpd the painting device. If 0, then widget
will be used.
Definition at line 127 of file skyqpainter.cpp.
◆ ~SkyQPainter()
|
override |
Definition at line 136 of file skyqpainter.cpp.
Member Function Documentation
◆ begin()
|
overridevirtual |
Begin painting.
- Note
- this function must be called before painting anything.
- See also
- end()
Implements SkyPainter.
Definition at line 141 of file skyqpainter.cpp.
◆ drawAsteroid()
|
overridevirtual |
Draw an asteroid in the sky.
- Parameters
-
ast asteroid to draw
- Returns
- true if a asteroid was drawn
Implements SkyPainter.
Definition at line 578 of file skyqpainter.cpp.
◆ drawCatalogObject()
|
overridevirtual |
Draw a deep sky object (loaded from the new implementation)
- Parameters
-
obj the object to draw drawImage if true, try to draw the image of the object
- Returns
- true if it was drawn
Implements SkyPainter.
Definition at line 853 of file skyqpainter.cpp.
◆ drawCatalogObjectImage()
void SkyQPainter::drawCatalogObjectImage | ( | const QPointF & | pos, |
const CatalogObject & | obj, | ||
float | positionAngle ) |
Definition at line 834 of file skyqpainter.cpp.
◆ drawComet()
|
overridevirtual |
Draw a comet in the sky.
- Parameters
-
com comet to draw
- Returns
- true if a comet was drawn
Implements SkyPainter.
Definition at line 510 of file skyqpainter.cpp.
◆ drawConstellationArtImage()
|
overridevirtual |
Draw a ConstellationsArt object.
- Parameters
-
obj the object to draw
- Returns
- true if it was drawn
Implements SkyPainter.
Definition at line 658 of file skyqpainter.cpp.
◆ drawDeepSkySymbol()
|
virtual |
Definition at line 889 of file skyqpainter.cpp.
◆ drawEarthShadow()
|
overridevirtual |
Draw the earths shadow on the moon (red-ish)
- Parameters
-
shadow the shadow to draw
- Returns
- true if it was drawn
Implements SkyPainter.
Definition at line 484 of file skyqpainter.cpp.
◆ drawFlags()
|
overridevirtual |
◆ drawHips()
|
overridevirtual |
drawMosaicPanel Draws mosaic panel in planning or operation mode.
- Returns
- true if it was drawn
drawHips Draw HIPS all sky catalog
- Parameters
-
useCache if True, try to re-use last generated image instead of rendering a new image.
- Returns
- true if it was drawn
Implements SkyPainter.
Definition at line 725 of file skyqpainter.cpp.
◆ drawHorizon()
|
overridevirtual |
Implements SkyPainter.
Definition at line 1178 of file skyqpainter.cpp.
◆ drawImageOverlay()
|
overridevirtual |
drawImageOverlay Draws a user-supplied image onto the skymap
- Parameters
-
useCache if True, try to re-use last generated image instead of rendering a new image.
- Returns
- true if it was drawn
Implements SkyPainter.
Definition at line 761 of file skyqpainter.cpp.
◆ drawObservingList()
Draw the symbols for the observing list.
- Parameters
-
obs the observing list
Implements SkyPainter.
Definition at line 1128 of file skyqpainter.cpp.
◆ drawPlanet()
|
overridevirtual |
Draw a planet.
- Parameters
-
planet the planet to draw
- Returns
- true if it was drawn
Implements SkyPainter.
Definition at line 413 of file skyqpainter.cpp.
◆ drawPointSource() [1/2]
This function exists so that we can draw other objects (e.g., planets) as point sources.
Definition at line 622 of file skyqpainter.cpp.
◆ drawPointSource() [2/2]
|
overridevirtual |
Draw a point source (e.g., a star).
- Parameters
-
loc the location of the source in the sky mag the magnitude of the source sp the spectral class of the source
- Returns
- true if a source was drawn
Implements SkyPainter.
Definition at line 602 of file skyqpainter.cpp.
◆ drawSatellite()
|
overridevirtual |
◆ drawSkyBackground()
|
overridevirtual |
◆ drawSkyLine()
Draw a line between points in the sky.
- Parameters
-
a the first point b the second point
- Note
- this function will skip lines not on screen and clip lines that are only partially visible.
Implements SkyPainter.
Definition at line 275 of file skyqpainter.cpp.
◆ drawSkyPolygon()
Draw a polygon in the sky.
- Parameters
-
list a list of points in the sky forceClip If true (default), it enforces clipping of the polygon, otherwise, it draws the complete polygen without running any boundary checks.
- See also
- drawSkyPolyline()
Implements SkyPainter.
Definition at line 355 of file skyqpainter.cpp.
◆ drawSkyPolyline()
|
overridevirtual |
Draw a polyline in the sky.
- Parameters
-
list a list of points in the sky skipList a SkipList object used to control skipping line segments label a pointer to the label for this line
- Note
- it's more efficient to use this than repeated calls to drawSkyLine(), because it avoids an extra points->size() -2 projections.
Implements SkyPainter.
Definition at line 301 of file skyqpainter.cpp.
◆ drawSupernova()
|
overridevirtual |
◆ drawTerrain()
|
overridevirtual |
drawTerrain Draw the Terrain
- Parameters
-
useCache if True, try to re-use last generated image instead of rendering a new image.
- Returns
- true if it was drawn
Implements SkyPainter.
Definition at line 745 of file skyqpainter.cpp.
◆ end()
|
overridevirtual |
End and finalize painting.
- Note
- this function must be called after painting anything.
- it is not guaranteed that anything will actually be drawn until end() is called.
- See also
- begin();
Implements SkyPainter.
Definition at line 150 of file skyqpainter.cpp.
◆ getVectorStars()
|
inline |
Definition at line 73 of file skyqpainter.h.
◆ initStarImages()
|
static |
Recalculates the star pixmaps.
Definition at line 172 of file skyqpainter.cpp.
◆ releaseImageCache()
|
static |
Release the image cache.
Definition at line 95 of file skyqpainter.cpp.
◆ setBrush()
Set the brush of the painter.
Implements SkyPainter.
Definition at line 167 of file skyqpainter.cpp.
◆ setPaintDevice()
|
inline |
Definition at line 58 of file skyqpainter.h.
◆ setPen()
◆ setVectorStars()
|
inline |
- Parameters
-
vectorStars Draw stars as vector graphics whenever possible.
- Note
- Drawing stars as vectors is slower, but is better when saving .svg files. Set to true only when you are drawing on a canvas where speed doesn't matter. Definitely not when drawing on the SkyMap.
Definition at line 69 of file skyqpainter.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:05 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.