Gui Image.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. /******************************************************************************/
  2. const_mem_addr STRUCT(GuiImage , GuiObj) // Gui Image !! must be stored in constant memory address !!
  3. //{
  4. Bool fit ; // if maintain proportions of the image, default=false
  5. ALPHA_MODE alpha_mode; // alpha blending mode , default=ALPHA_BLEND
  6. Color rect_color, // rectangle color , default=Gui.borderColor
  7. color , // image color , default=WHITE
  8. color_add ; // image color add , default=TRANSPARENT
  9. ImagePtr image ; // image
  10. // manage
  11. GuiImage& del ( ); // delete
  12. GuiImage& create( C ImagePtr &image=null); // create
  13. GuiImage& create(C Rect &rect, C ImagePtr &image=null) {create(image).rect(rect); return T;} // create
  14. GuiImage& create(C GuiImage &src ); // create from 'src'
  15. // set
  16. GuiImage& set(C ImagePtr &image); // set image
  17. // main
  18. virtual void draw(C GuiPC &gpc); // draw object
  19. #if EE_PRIVATE
  20. void zero();
  21. #endif
  22. ~GuiImage() {del();}
  23. GuiImage();
  24. protected:
  25. virtual Bool save(File &f, CChar *path=null)C;
  26. virtual Bool load(File &f, CChar *path=null) ;
  27. };
  28. /******************************************************************************/