[Kstars-devel] ConstellationArt Class

M.S. Adityan msadityan at gmail.com
Fri May 29 09:57:41 UTC 2015


Hi Jasem,

I have written some code, and would like your views on it.

Here is the ConstellationArt class: https://paste.kde.org/ptjmjexsk
Here is its implementation: https://paste.kde.org/peibzepto

I am treating ConstellationArt as a SkyComponent. Currently what I have
done is, I have opened the file constellationart.txt and read the values
from that file. What I intend to do now is to make an array of 88 elements,
each of which would be a structure that would hold information regarding
the constellation art to be displayed. The structure would contain
x1,y1,hd1,x2,y2,hd2,x3,y3,hd3,abbreviation,imageFileName where x1,y1,hd1
stand for x coordinate of pixel, y coordinate of pixel, and HD number of
Star 1. Like wise for star 2 and star 3.

After this, I will have to pass them to the function draw(), which would
draw the image on screen. But I am not very sure how to implement draw.
Basically what I want it to do is to just draw the image contained in
andromeda.png (for an example), and anchor the image to the stars used in
Andromeda.

A few questions I am wondering about is, if the constellation image is
fixed to the 3 reference stars, then I don't need to worry about it going
over the horizon, right? Meaning the image shouldn't display when it goes
over the horizon. Secondly, the images used are atleast 256x256 pixels,
some are 512x512, and others are 1024x1024, so I am not very sure how to
account for zooming in an out. Is that taken care off automatically, or
would I be required to write separate zoom functions?

Regards
M.S.Adityan
Website: www.msadityan.com
https://www.linkedin.com/in/msadityan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20150529/043b08e9/attachment.html>


More information about the Kstars-devel mailing list