mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:10:04 +00:00 
			
		
		
		
	Implement active box using new draw item on draw layers
This commit is contained in:
		
							parent
							
								
									999d322985
								
							
						
					
					
						commit
						d30b6d4011
					
				
					 13 changed files with 610 additions and 37 deletions
				
			
		
							
								
								
									
										48
									
								
								scwx-qt/source/scwx/qt/gl/draw/rectangle.hpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								scwx-qt/source/scwx/qt/gl/draw/rectangle.hpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,48 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <scwx/qt/gl/gl.hpp> | ||||
| #include <scwx/qt/gl/draw/draw_item.hpp> | ||||
| 
 | ||||
| #include <boost/gil.hpp> | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace qt | ||||
| { | ||||
| namespace gl | ||||
| { | ||||
| namespace draw | ||||
| { | ||||
| 
 | ||||
| class RectangleImpl; | ||||
| 
 | ||||
| class Rectangle : public DrawItem | ||||
| { | ||||
| public: | ||||
|    explicit Rectangle(OpenGLFunctions& gl); | ||||
|    ~Rectangle(); | ||||
| 
 | ||||
|    Rectangle(const Rectangle&) = delete; | ||||
|    Rectangle& operator=(const Rectangle&) = delete; | ||||
| 
 | ||||
|    Rectangle(Rectangle&&) noexcept; | ||||
|    Rectangle& operator=(Rectangle&&) noexcept; | ||||
| 
 | ||||
|    void Initialize() override; | ||||
|    void Render() override; | ||||
|    void Deinitialize() override; | ||||
| 
 | ||||
|    void SetBorder(float width, boost::gil::rgba8_pixel_t color); | ||||
|    void SetFill(boost::gil::rgba8_pixel_t color); | ||||
|    void SetPosition(float x, float y); | ||||
|    void SetSize(float width, float height); | ||||
|    void SetVisible(bool visible); | ||||
| 
 | ||||
| private: | ||||
|    std::unique_ptr<RectangleImpl> p; | ||||
| }; | ||||
| 
 | ||||
| } // namespace draw
 | ||||
| } // namespace gl
 | ||||
| } // namespace qt
 | ||||
| } // namespace scwx
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat