SputnikDrawer.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. ============================================================================
  3. Name : SputnikDrawer.h
  4. Author : Den Grigorenko
  5. Copyright : Copyright (c) 2008 Den123
  6. Description : CSputnikDrawer - this custom control allows to display
  7. satellites on the celestial sphere
  8. ============================================================================
  9. */
  10. #ifndef __SPUTNIK_DRAWER_H__
  11. #define __SPUTNIK_DRAWER_H__
  12. #include <coecntrl.h>
  13. #include <lbssatellite.h>
  14. #include <gdi.h>
  15. // FORWARD DECLARATIONS
  16. class CGulIcon;
  17. class SFontData;
  18. class CSputnikDrawer : public CCoeControl
  19. {
  20. public:
  21. ~CSputnikDrawer();
  22. void ConstructL( const CCoeControl* aParent, SFontData* aFontData, TPositionSatelliteInfo* aData, const TDesC& aWaitMess );
  23. void SetAngle( TInt aAngle );
  24. private:
  25. void SizeChanged();
  26. void Draw( const TRect& aRect ) const;
  27. void DrawSputnik( CBitmapContext& aGc, TSatelliteData& aSatData, TInt aRadius, TInt anOffs ) const;
  28. void ConsiderAngle( TReal& aX, TReal& aY, TInt aRadius, TInt anOffs ) const;
  29. private:
  30. TReal iAngle;
  31. TBuf<128> iWaitMess;
  32. CGulIcon *iIconSphere, *iIconGreen, *iIconGray;
  33. SFontData* iFontData;
  34. TPositionSatelliteInfo* iData;
  35. private:
  36. // èçîáðàæåíèå ïåðâîíà÷àëüíî îòðèñîâûâàåòñÿ íà iOffScreenBitmap
  37. TDisplayMode iMode;
  38. CFbsBitmap* iOffScreenBitmap;
  39. CFbsBitmap* iRotatedOffscreenBitmap;
  40. CFbsBitmapDevice* iOffScreenBitmapDevice;
  41. CFbsBitGc* iOffScreenBitmapGc;
  42. };
  43. #endif