Revision 551264

Go back to digest for 18th June 2006

Optimization in Educational

Jason Harris committed changes in /trunk/KDE/kdeedu/kstars/kstars:

Speed up drawing stars. Thanks for the ideas, James.(1) Move color calculation out of draw loop. StarObject now has a
static QMap member that holds QColors for each spectral type. These
colors are updated once per draw cycle, to match the current state:
+ if using Antialiased drawing and map is not slewing, use full
saturated colors
+ if AA is off, or map is slewing, desaturate the color.(2) Draw star labels in a separate loop, so we don't have to reset the
Font and Pen color for each star.(3) Set the QBrush color outside the draw loop.

File Changes

Modified 3 files
  • /trunk/KDE/kdeedu/kstars/kstars
  •   /starobject.cpp
  •   /starobject.h
  •   /skycomponents/starcomponent.cpp
3 files changed in total