kstars
skyqpainter.cpp
Go to the documentation of this file.
162 fillRect(0, 0, m_size.width(), m_size.height(), KStarsData::Instance()->colorScheme()->colorNamed("SkyColor"));
417 float fakeStarSize = (10.0 + log10(Options::zoomFactor()) - log10(MINZOOM)) * (10 - planet->mag()) / 10;
486 double penumbra_size = shadow->getPenumbraAngSize() * dms::PI * Options::zoomFactor() / 10800.0;
516 double comaLength = (com->getComaAngSize().arcmin() * dms::PI * Options::zoomFactor() / 10800.0);
526 const QVector<QPoint> coma = { QPoint(pos.x() - size, pos.y()), QPoint(pos.x() + size, pos.y()),
570 pos)) // FIXME: onScreen here should use canvas size rather than SkyMap size, especially while printing in portrait mode!
586 // Draw stars as bitmaps, either because we were asked to, or because we're painting real colors
601 // Note: This is not efficient, but we use vector stars only when plotting SVG, not when drawing the skymap, so speed is not very important.
622 obj->EquatorialToHorizontal(KStarsData::Instance()->lst(), KStarsData::Instance()->geo()->lat());
629 float positionangle = m_proj->findPA(obj, constellationmidpoint.x(), constellationmidpoint.y());
711 void SkyQPainter::drawDeepSkySymbol(const QPointF &pos, int type, float size, float e, float positionAngle)
902 default: // Unknown object or something we don't know how to draw. Just draw an ellipse with a ?-mark
1056 //qDebug()<<"sup->ra() = "<<(sup->ra()).toHMSString()<<"sup->dec() = "<<sup->dec().toDMSString();
void setOpacity(qreal opacity)
void setStyle(Qt::PenStyle style)
bool onScreen(const QPointF &p) const
Check whether the projected point is on-screen.
Definition: projector.cpp:108
int width() const
bool drawDeepSkyObject(DeepSkyObject *obj, bool drawImage=false) override
Draw a deep sky object.
Definition: skyqpainter.cpp:663
void drawHorizon(bool filled, SkyPoint *labelPoint=nullptr, bool *drawLabel=nullptr) override
Definition: skyqpainter.cpp:989
int width() const
bool end()
void fillRect(const QRectF &rectangle, const QBrush &brush)
void setRenderHint(RenderHint hint, bool on)
void drawSkyPolyline(LineList *list, SkipHashList *skipList=nullptr, LineListLabel *label=nullptr) override
Draw a polyline in the sky.
Definition: skyqpainter.cpp:298
void fill(const QColor &color)
QString name() const
qreal pointSizeF() const
Definition: linelistlabel.h:35
void setColorAt(qreal position, const QColor &color)
const QFont & font() const
void drawPolyline(const QPointF *points, int pointCount)
const T & at(int i) const
T & last()
void save()
void drawPolygon(const QPointF *points, int pointCount, Qt::FillRule fillRule)
bool drawEarthShadow(KSEarthShadow *shadow) override
Draw the earths shadow on the moon (red-ish)
Definition: skyqpainter.cpp:474
void drawSkyPolygon(LineList *list, bool forceClip=true) override
Draw a polygon in the sky.
Definition: skyqpainter.cpp:349
SolarSystemComposite * solarSystemComposite()
Definition: skymapcomposite.h:198
int height() const
void EquatorialToHorizontal(const CachingDms *LST, const CachingDms *lat)
Determine the (Altitude, Azimuth) coordinates of the SkyPoint from its (RA, Dec) coordinates, given the local sidereal time and the observer's latitude.
Definition: skypoint.cpp:70
QColor colorNamed(const QString &name) const
Retrieve a color by name.
Definition: colorscheme.cpp:99
T & first()
bool isNull() const
void rotate(qreal angle)
void drawLine(const QLineF &line)
void clear()
int width() const
QList< Key > keys() const
size
QColor color() const
Definition: projector.h:90
void setFont(const QFont &font)
Definition: skiphashlist.h:32
QColor fromRgb(QRgb rgb)
QTransform & translate(qreal dx, qreal dy)
double findPA(SkyObject *o, float x, float y) const
Determine the on-screen position angle of a SkyObject.
Definition: projector.cpp:275
qreal x() const
qreal y() const
SkyList * points()
return the list of points for iterating or appending (or whatever).
Definition: linelist.h:44
void drawPoint(const QPointF &position)
QList< std::shared_ptr< SkyPoint > > & pointList()
Definition: pointlistcomponent.h:59
float starWidth(float mag) const
Get the width of a star of magnitude mag.
Definition: skypainter.cpp:45
void drawArc(const QRectF &rectangle, int startAngle, int spanAngle)
bool drawPointSource(SkyPoint *loc, float mag, char sp= 'A') override
Draw a point source (e.g., a star).
Definition: skyqpainter.cpp:560
void setPen(const QColor &color)
int width() const
void drawEllipse(const QRectF &rectangle)
void drawPixmap(const QRectF &target, const QPixmap &pixmap, const QRectF &source)
void setBrush(const QBrush &brush)
void drawSkyLine(SkyPoint *a, SkyPoint *b) override
Draw a line between points in the sky.
Definition: skyqpainter.cpp:272
void drawText(const QPointF &position, const QString &text)
void drawObservingList(const QList< SkyObject * > &obs) override
Draw the symbols for the observing list.
Definition: skyqpainter.cpp:939
QPixmap scaled(int width, int height, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const
bool render(uint16_t w, uint16_t h, QImage *hipsImage, const Projector *m_proj)
Definition: hipsrenderer.cpp:36
QPointF clipLine(SkyPoint *p1, SkyPoint *p2) const
ASSUMES *p1 did not clip but *p2 did.
Definition: projector.cpp:118
const QBrush & brush() const
void setHsvF(qreal h, qreal s, qreal v, qreal a)
int width(const QString &text, int len) const
void setPointSizeF(qreal pointSize)
QRect viewport() const
A class that manages the calculation of the earths shadow (in moon distance) as a 'virtual' skyobject...
Definition: ksearthshadow.h:38
void restore()
Provides all necessary information about a deep-sky object: data inherited from SkyObject (coordinate...
Definition: deepskyobject.h:45
const T & at(int i) const
SkyQPainter(QPaintDevice *pd, const QSize &canvasSize)
Creates a SkyQPainter with the given QPaintDevice and uses the dimensions of the paint device as canv...
Definition: skyqpainter.cpp:123
Definition: overlap.h:177
int width() const
void drawImage(const QRectF &target, const QImage &image, const QRectF &source, QFlags< Qt::ImageConversionFlag > flags)
virtual void drawDeepSkySymbol(const QPointF &pos, int type, float size, float e, float positionAngle)
Definition: skyqpainter.cpp:711
static bool drawSatellitesLikeStars()
Get If selected, satellites will be draw like stars, otherwise, draw satellites as small colored squa...
Definition: Options.h:4933
static constexpr double PI
PI is a const static member; it's public so that it can be used anywhere, as long as dms...
Definition: dms.h:385
QFontMetrics fontMetrics() const
QPointF vecToPoint(const Eigen::Vector2f &vec)
Convert a vector to a point.
Definition: ksutils.h:116
void drawConvexPolygon(const QPointF *points, int pointCount)
int height() const
void translate(const QPointF &offset)
A subclass of TrailObject that provides additional information needed for most solar system objects...
Definition: ksplanetbase.h:60
Definition: hipsrenderer.h:31
void getHsvF(qreal *h, qreal *s, qreal *v, qreal *a) const
int height() const
iterator insert(const Key &key, const T &value)
bool isEmpty() const
bool drawConstellationArtImage(ConstellationsArt *obj) override
Draw a ConstellationsArt object.
Definition: skyqpainter.cpp:617
virtual QVector< Vector2f > groundPoly(SkyPoint *labelpoint=nullptr, bool *drawLabel=nullptr) const
Get the ground polygon.
Definition: projector.cpp:280
int height() const
void setBrush(const QBrush &brush) override
Set the brush of the painter.
Definition: skyqpainter.cpp:170
int size() const
Provides all necessary information about an object in the sky: its coordinates, name(s), type, magnitude, and QStringLists of URLs for images and webpages regarding the object.
Definition: skyobject.h:43
QPointF toScreen(const SkyPoint *o, bool oRefract=true, bool *onVisibleHemisphere=nullptr) const
This is exactly the same as toScreenVec but it returns a QPointF.
Definition: projector.cpp:103
bool begin(QPaintDevice *device)
bool checkVisibility(const SkyPoint *p) const
Determine if the skypoint p is likely to be visible in the display window.
Definition: projector.cpp:193
const QPen & pen() const
void updateLabelCandidates(qreal x, qreal y, LineList *lineList, int i)
Definition: linelistlabel.cpp:62
const T value(const Key &key) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Sun Dec 15 2019 03:10:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2019 The KDE developers.
Generated on Sun Dec 15 2019 03:10:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.