mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 03:40:05 +00:00 
			
		
		
		
	Placefile image rendering
This commit is contained in:
		
							parent
							
								
									44030fdf87
								
							
						
					
					
						commit
						00c297094e
					
				
					 5 changed files with 545 additions and 1 deletions
				
			
		
							
								
								
									
										61
									
								
								scwx-qt/source/scwx/qt/gl/draw/placefile_images.hpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								scwx-qt/source/scwx/qt/gl/draw/placefile_images.hpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,61 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <scwx/qt/gl/gl_context.hpp> | ||||
| #include <scwx/qt/gl/draw/draw_item.hpp> | ||||
| #include <scwx/gr/placefile.hpp> | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace qt | ||||
| { | ||||
| namespace gl | ||||
| { | ||||
| namespace draw | ||||
| { | ||||
| 
 | ||||
| class PlacefileImages : public DrawItem | ||||
| { | ||||
| public: | ||||
|    explicit PlacefileImages(const std::shared_ptr<GlContext>& context); | ||||
|    ~PlacefileImages(); | ||||
| 
 | ||||
|    PlacefileImages(const PlacefileImages&)            = delete; | ||||
|    PlacefileImages& operator=(const PlacefileImages&) = delete; | ||||
| 
 | ||||
|    PlacefileImages(PlacefileImages&&) noexcept; | ||||
|    PlacefileImages& operator=(PlacefileImages&&) noexcept; | ||||
| 
 | ||||
|    void set_thresholded(bool thresholded); | ||||
| 
 | ||||
|    void Initialize() override; | ||||
|    void Render(const QMapLibreGL::CustomLayerRenderParameters& params, | ||||
|                bool textureAtlasChanged) override; | ||||
|    void Deinitialize() override; | ||||
| 
 | ||||
|    /**
 | ||||
|     * Resets and prepares the draw item for adding a new set of images. | ||||
|     */ | ||||
|    void StartImages(const std::string& baseUrl); | ||||
| 
 | ||||
|    /**
 | ||||
|     * Adds a placefile image to the internal draw list. | ||||
|     * | ||||
|     * @param [in] di Placefile image | ||||
|     */ | ||||
|    void AddImage(const std::shared_ptr<gr::Placefile::ImageDrawItem>& di); | ||||
| 
 | ||||
|    /**
 | ||||
|     * Finalizes the draw item after adding new images. | ||||
|     */ | ||||
|    void FinishImages(); | ||||
| 
 | ||||
| private: | ||||
|    class Impl; | ||||
| 
 | ||||
|    std::unique_ptr<Impl> p; | ||||
| }; | ||||
| 
 | ||||
| } // namespace draw
 | ||||
| } // namespace gl
 | ||||
| } // namespace qt
 | ||||
| } // namespace scwx
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat