SkyPainter

Search for usage in LXR

SkyPainter Class Referenceabstract

#include <skypainter.h>

Inheritance diagram for SkyPainter:

Public Member Functions

virtual void begin ()=0
 
virtual bool drawAsteroid (KSAsteroid *ast)=0
 
virtual bool drawCatalogObject (const CatalogObject &obj)=0
 
virtual bool drawComet (KSComet *com)=0
 
virtual bool drawConstellationArtImage (ConstellationsArt *obj)=0
 
virtual bool drawEarthShadow (KSEarthShadow *shadow)=0
 
virtual void drawFlags ()=0
 
virtual bool drawHips (bool useCache=false)=0
 
virtual void drawHorizon (bool filled, SkyPoint *labelPoint=nullptr, bool *drawLabel=nullptr)=0
 
virtual bool drawImageOverlay (const QList< ImageOverlay > *imageOverlays, bool useCache=false)=0
 
virtual void drawObservingList (const QList< SkyObject * > &obs)=0
 
virtual bool drawPlanet (KSPlanetBase *planet)=0
 
virtual bool drawPointSource (const SkyPoint *loc, float mag, char sp='A')=0
 
virtual bool drawSatellite (Satellite *sat)=0
 
virtual void drawSkyBackground ()=0
 
virtual void drawSkyLine (SkyPoint *a, SkyPoint *b)=0
 
virtual void drawSkyPolygon (LineList *list, bool forceClip=true)=0
 
virtual void drawSkyPolyline (LineList *list, SkipHashList *skipList=nullptr, LineListLabel *label=nullptr)=0
 
virtual bool drawSupernova (Supernova *sup)=0
 
virtual bool drawTerrain (bool useCache=false)=0
 
virtual void end ()=0
 
virtual void setBrush (const QBrush &brush)=0
 
virtual void setPen (const QPen &pen)=0
 
void setSizeMagLimit (float sizeMagLim)
 
float starWidth (float mag) const
 

Detailed Description

Draws things on the sky, without regard to backend.

This class serves as an interface to draw objects onto the sky without worrying about whether we are using a QPainter or OpenGL.

Definition at line 39 of file skypainter.h.

Constructor & Destructor Documentation

◆ SkyPainter()

SkyPainter::SkyPainter ( )

Definition at line 21 of file skypainter.cpp.

Member Function Documentation

◆ begin()

virtual void SkyPainter::begin ( )
pure virtual

Begin painting.

Note
this function must be called before painting anything.
See also
end()

Implemented in SkyQPainter.

◆ drawAsteroid()

virtual bool SkyPainter::drawAsteroid ( KSAsteroid * ast)
pure virtual

Draw an asteroid in the sky.

Parameters
astasteroid to draw
Returns
true if a asteroid was drawn

Implemented in SkyQPainter.

◆ drawCatalogObject()

virtual bool SkyPainter::drawCatalogObject ( const CatalogObject & obj)
pure virtual

Draw a deep sky object (loaded from the new implementation)

Parameters
objthe object to draw
drawImageif true, try to draw the image of the object
Returns
true if it was drawn

Implemented in SkyQPainter.

◆ drawComet()

virtual bool SkyPainter::drawComet ( KSComet * com)
pure virtual

Draw a comet in the sky.

Parameters
comcomet to draw
Returns
true if a comet was drawn

Implemented in SkyQPainter.

◆ drawConstellationArtImage()

virtual bool SkyPainter::drawConstellationArtImage ( ConstellationsArt * obj)
pure virtual

Draw a ConstellationsArt object.

Parameters
objthe object to draw
Returns
true if it was drawn

Implemented in SkyQPainter.

◆ drawEarthShadow()

virtual bool SkyPainter::drawEarthShadow ( KSEarthShadow * shadow)
pure virtual

Draw the earths shadow on the moon (red-ish)

Parameters
shadowthe shadow to draw
Returns
true if it was drawn

Implemented in SkyQPainter.

◆ drawFlags()

virtual void SkyPainter::drawFlags ( )
pure virtual

Draw flags.

Implemented in SkyQPainter.

◆ drawHips()

virtual bool SkyPainter::drawHips ( bool useCache = false)
pure virtual

drawMosaicPanel Draws mosaic panel in planning or operation mode.

Returns
true if it was drawn

drawHips Draw HIPS all sky catalog

Parameters
useCacheif True, try to re-use last generated image instead of rendering a new image.
Returns
true if it was drawn

Implemented in SkyQPainter.

◆ drawImageOverlay()

virtual bool SkyPainter::drawImageOverlay ( const QList< ImageOverlay > * imageOverlays,
bool useCache = false )
pure virtual

drawImageOverlay Draws a user-supplied image onto the skymap

Parameters
useCacheif True, try to re-use last generated image instead of rendering a new image.
Returns
true if it was drawn

Implemented in SkyQPainter.

◆ drawObservingList()

virtual void SkyPainter::drawObservingList ( const QList< SkyObject * > & obs)
pure virtual

Draw the symbols for the observing list.

Parameters
obsthe observing list

Implemented in SkyQPainter.

◆ drawPlanet()

virtual bool SkyPainter::drawPlanet ( KSPlanetBase * planet)
pure virtual

Draw a planet.

Parameters
planetthe planet to draw
Returns
true if it was drawn

Implemented in SkyQPainter.

◆ drawPointSource()

virtual bool SkyPainter::drawPointSource ( const SkyPoint * loc,
float mag,
char sp = 'A' )
pure virtual

Draw a point source (e.g., a star).

Parameters
locthe location of the source in the sky
magthe magnitude of the source
spthe spectral class of the source
Returns
true if a source was drawn

Implemented in SkyQPainter.

◆ drawSatellite()

virtual bool SkyPainter::drawSatellite ( Satellite * sat)
pure virtual

Draw a satellite.

Implemented in SkyQPainter.

◆ drawSkyBackground()

virtual void SkyPainter::drawSkyBackground ( )
pure virtual

Draw the sky background.

Implemented in SkyQPainter.

◆ drawSkyLine()

virtual void SkyPainter::drawSkyLine ( SkyPoint * a,
SkyPoint * b )
pure virtual

Draw a line between points in the sky.

Parameters
athe first point
bthe second point
Note
this function will skip lines not on screen and clip lines that are only partially visible.

Implemented in SkyQPainter.

◆ drawSkyPolygon()

virtual void SkyPainter::drawSkyPolygon ( LineList * list,
bool forceClip = true )
pure virtual

Draw a polygon in the sky.

Parameters
lista list of points in the sky
forceClipIf true (default), it enforces clipping of the polygon, otherwise, it draws the complete polygen without running any boundary checks.
See also
drawSkyPolyline()

Implemented in SkyQPainter.

◆ drawSkyPolyline()

virtual void SkyPainter::drawSkyPolyline ( LineList * list,
SkipHashList * skipList = nullptr,
LineListLabel * label = nullptr )
pure virtual

Draw a polyline in the sky.

Parameters
lista list of points in the sky
skipLista SkipList object used to control skipping line segments
labela 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.

Implemented in SkyQPainter.

◆ drawSupernova()

virtual bool SkyPainter::drawSupernova ( Supernova * sup)
pure virtual

Draw a Supernova.

Implemented in SkyQPainter.

◆ drawTerrain()

virtual bool SkyPainter::drawTerrain ( bool useCache = false)
pure virtual

drawTerrain Draw the Terrain

Parameters
useCacheif True, try to re-use last generated image instead of rendering a new image.
Returns
true if it was drawn

Implemented in SkyQPainter.

◆ end()

virtual void SkyPainter::end ( )
pure virtual

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();

Implemented in SkyQPainter.

◆ setBrush()

virtual void SkyPainter::setBrush ( const QBrush & brush)
pure virtual

Set the brush of the painter.

Implemented in SkyQPainter.

◆ setPen()

virtual void SkyPainter::setPen ( const QPen & pen)
pure virtual

Set the pen of the painter.

Implemented in SkyQPainter.

◆ setSizeMagLimit()

void SkyPainter::setSizeMagLimit ( float sizeMagLim)

Definition at line 25 of file skypainter.cpp.

◆ starWidth()

float SkyPainter::starWidth ( float mag) const

Get the width of a star of magnitude mag.

Definition at line 30 of file skypainter.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.