[Kstars-devel] Re: Review Request: Legend feature (currently used only for exported images)

Rafal Kulaga rl.kulaga at gmail.com
Tue Jul 12 12:31:43 CEST 2011



> On July 11, 2011, 2:15 a.m., Akarsh Simha wrote:
> > kstars/skyqpainter.cpp, line 375
> > <http://git.reviewboard.kde.org/r/101912/diff/1/?file=26671#file26671line375>
> >
> >     Could you explain this change? I'm not sure about the details, but do note that there are stars in the NGC and IC catalogs that are sometimes not part of the other star catalogs we use.
> >     
> >     Edit: Sorry, I think I notice that the star's dia is set to 2.0 if it is less than 2.0 in drawDeepSkySymbol(...), whereby it will get drawn anyway. Am I right here?

Sorry for omitting this question before clicking "Publish". Basically, the above doesn't change anything in terms of drawing. This entire chunk:

    // if size is 0.0 set it to 1.0, this are normally stars (type 0 and 1)
    // if we use size 0.0 the star wouldn't be drawn
    float majorAxis = obj->a();
    if ( majorAxis == 0.0 ) {   majorAxis = 1.0; }

    float size = majorAxis * dms::PI * Options::zoomFactor() / 10800.0;

was taken from SkyQPainter::drawDeepSkySymbol(const QPointF& pos, DeepSkyObject* obj, float positionAngle) to enable drawing of deep sky symbols without creating bogo-objects (just by passing QPointF and parameters such as type, size and e parameter) - just as below :-)


- Rafal


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101912/#review4584
-----------------------------------------------------------


On July 10, 2011, 10:38 p.m., Rafal Kulaga wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101912/
> -----------------------------------------------------------
> 
> (Updated July 10, 2011, 10:38 p.m.)
> 
> 
> Review request for KStars, Victor Carbune and Akarsh Simha.
> 
> 
> Summary
> -------
> 
> Attached diff adds the option to include legends in exported sky images. Both vertical and horizontal orientations are supported; there are two types of legend: full-blown (symbol descriptions, star magnitudes and scale) and scale-only. Some changes will inevitably be made to this code in a few days - please note that there are some hard-coded values in legend.cpp which will be gone after integration with the functionality I am developing now (FOV representation exporting).
> 
> Any comments are welcome, be they look&feel or code-related.
> 
> 
> Diffs
> -----
> 
>   kstars/CMakeLists.txt 0c335b6 
>   kstars/dialogs/exportimagedialog.h PRE-CREATION 
>   kstars/dialogs/exportimagedialog.cpp PRE-CREATION 
>   kstars/dialogs/exportimagedialog.ui PRE-CREATION 
>   kstars/kstarsactions.cpp e917cac 
>   kstars/kstarsdcop.cpp 42dcb0f 
>   kstars/legend.h PRE-CREATION 
>   kstars/legend.cpp PRE-CREATION 
>   kstars/skymap.h e7a7f56 
>   kstars/skymapdrawabstract.h c94a745 
>   kstars/skymapdrawabstract.cpp cf44fc5 
>   kstars/skypainter.h 1340568 
>   kstars/skyqpainter.h df7cc9b 
>   kstars/skyqpainter.cpp 87719b2 
> 
> Diff: http://git.reviewboard.kde.org/r/101912/diff
> 
> 
> Testing
> -------
> 
> Done some testing, everything worked (and looked) fine for me.
> 
> 
> Thanks,
> 
> Rafal
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kstars-devel/attachments/20110712/89eb91e7/attachment.htm 


More information about the Kstars-devel mailing list