| 
									
										
										
										
											2019-04-11 14:40:54 +08:00
										 |  |  |  | // Copyright (c) 2016-2018 Kiwano - Nomango
 | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | // 
 | 
					
						
							|  |  |  |  | // Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
					
						
							|  |  |  |  | // of this software and associated documentation files (the "Software"), to deal
 | 
					
						
							|  |  |  |  | // in the Software without restriction, including without limitation the rights
 | 
					
						
							|  |  |  |  | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
					
						
							|  |  |  |  | // copies of the Software, and to permit persons to whom the Software is
 | 
					
						
							|  |  |  |  | // furnished to do so, subject to the following conditions:
 | 
					
						
							|  |  |  |  | // 
 | 
					
						
							|  |  |  |  | // The above copyright notice and this permission notice shall be included in
 | 
					
						
							|  |  |  |  | // all copies or substantial portions of the Software.
 | 
					
						
							|  |  |  |  | // 
 | 
					
						
							|  |  |  |  | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
					
						
							|  |  |  |  | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
					
						
							|  |  |  |  | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
					
						
							|  |  |  |  | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
					
						
							|  |  |  |  | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
					
						
							|  |  |  |  | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
					
						
							|  |  |  |  | // THE SOFTWARE.
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | #pragma once
 | 
					
						
							|  |  |  |  | #include "../base/time.h"
 | 
					
						
							|  |  |  |  | #include "../base/Component.h"
 | 
					
						
							|  |  |  |  | #include "../base/Resource.h"
 | 
					
						
							|  |  |  |  | #include "../2d/include-forwards.h"
 | 
					
						
							|  |  |  |  | #include "helper.hpp"
 | 
					
						
							| 
									
										
										
										
											2019-08-13 14:44:37 +08:00
										 |  |  |  | #include "Image.h"
 | 
					
						
							| 
									
										
										
										
											2019-08-14 21:38:37 +08:00
										 |  |  |  | #include "Geometry.h"
 | 
					
						
							| 
									
										
										
										
											2019-08-15 11:22:51 +08:00
										 |  |  |  | #include "TextLayout.h"
 | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | #include "TextRenderer.h"
 | 
					
						
							| 
									
										
										
										
											2019-07-30 00:41:06 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | #if defined(KGE_USE_DIRECTX10)
 | 
					
						
							|  |  |  |  | #	include "D3D10DeviceResources.h"
 | 
					
						
							|  |  |  |  | #else
 | 
					
						
							|  |  |  |  | #	include "D3D11DeviceResources.h"
 | 
					
						
							|  |  |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-11 14:40:54 +08:00
										 |  |  |  | namespace kiwano | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | { | 
					
						
							| 
									
										
										
										
											2019-07-30 00:41:06 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | #if defined(KGE_USE_DIRECTX10)
 | 
					
						
							|  |  |  |  | 	typedef ID3D10DeviceResources ID3DDeviceResources; | 
					
						
							|  |  |  |  | #else
 | 
					
						
							|  |  |  |  | 	typedef ID3D11DeviceResources ID3DDeviceResources; | 
					
						
							|  |  |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-11 14:40:54 +08:00
										 |  |  |  | 	class KGE_API Renderer | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 		: public Singleton<Renderer> | 
					
						
							|  |  |  |  | 		, public Component | 
					
						
							|  |  |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2019-04-11 14:40:54 +08:00
										 |  |  |  | 		KGE_DECLARE_SINGLETON(Renderer); | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-15 11:22:51 +08:00
										 |  |  |  | 	public: | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
 | 
					
						
							|  |  |  |  | 		void SetClearColor( | 
					
						
							|  |  |  |  | 			Color const& clear_color | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD><EFBFBD>ģʽ
 | 
					
						
							|  |  |  |  | 		void SetAntialiasMode( | 
					
						
							|  |  |  |  | 			bool enabled | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֿ<EFBFBD><D6BF><EFBFBD><EFBFBD><EFBFBD>ģʽ
 | 
					
						
							|  |  |  |  | 		void SetTextAntialiasMode( | 
					
						
							|  |  |  |  | 			TextAntialias mode | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>رմ<D8B1>ֱͬ<D6B1><CDAC>
 | 
					
						
							|  |  |  |  | 		void SetVSyncEnabled( | 
					
						
							|  |  |  |  | 			bool enabled | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 	public: | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void CreateLayer( | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 			ComPtr<ID2D1Layer>& layer | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-15 11:22:51 +08:00
										 |  |  |  | 		void CreateTextFormat( | 
					
						
							|  |  |  |  | 			TextFormat& format, | 
					
						
							|  |  |  |  | 			Font const& font | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		void CreateTextLayout( | 
					
						
							|  |  |  |  | 			TextLayout& layout, | 
					
						
							|  |  |  |  | 			String const& text, | 
					
						
							|  |  |  |  | 			TextStyle const& style, | 
					
						
							|  |  |  |  | 			TextFormat const& format | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 21:38:37 +08:00
										 |  |  |  | 		void CreateLineGeometry( | 
					
						
							|  |  |  |  | 			Geometry& geo, | 
					
						
							|  |  |  |  | 			Point const& begin_pos, | 
					
						
							|  |  |  |  | 			Point const& end_pos | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		void CreateRectGeometry( | 
					
						
							|  |  |  |  | 			Geometry& geo, | 
					
						
							|  |  |  |  | 			Rect const& rect | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		void CreateRoundedRectGeometry( | 
					
						
							|  |  |  |  | 			Geometry& geo, | 
					
						
							|  |  |  |  | 			Rect const& rect, | 
					
						
							|  |  |  |  | 			Vec2 const& radius | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		void CreateEllipseGeometry( | 
					
						
							|  |  |  |  | 			Geometry& geo, | 
					
						
							|  |  |  |  | 			Point const& center, | 
					
						
							|  |  |  |  | 			Vec2 const& radius | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		void CreatePathGeometrySink( | 
					
						
							|  |  |  |  | 			GeometrySink& sink | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void DrawGeometry( | 
					
						
							| 
									
										
										
										
											2019-08-14 21:38:37 +08:00
										 |  |  |  | 			Geometry const& geometry, | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 			const Color& stroke_color, | 
					
						
							|  |  |  |  | 			float stroke_width, | 
					
						
							|  |  |  |  | 			StrokeStyle stroke = StrokeStyle::Miter | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void FillGeometry( | 
					
						
							| 
									
										
										
										
											2019-08-14 21:38:37 +08:00
										 |  |  |  | 			Geometry const& geometry, | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 			Color const& fill_color | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void DrawRectangle( | 
					
						
							| 
									
										
										
										
											2019-07-31 10:12:59 +08:00
										 |  |  |  | 			Rect const& rect, | 
					
						
							| 
									
										
										
										
											2019-08-14 21:38:37 +08:00
										 |  |  |  | 			Color const& stroke_color, | 
					
						
							| 
									
										
										
										
											2019-07-31 10:12:59 +08:00
										 |  |  |  | 			float stroke_width, | 
					
						
							|  |  |  |  | 			StrokeStyle stroke = StrokeStyle::Miter | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void FillRectangle( | 
					
						
							| 
									
										
										
										
											2019-07-31 10:12:59 +08:00
										 |  |  |  | 			Rect const& rect, | 
					
						
							|  |  |  |  | 			Color const& fill_color | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void DrawBitmap( | 
					
						
							| 
									
										
										
										
											2019-04-14 22:37:05 +08:00
										 |  |  |  | 			ComPtr<ID2D1Bitmap> const& bitmap, | 
					
						
							|  |  |  |  | 			Rect const& src_rect, | 
					
						
							|  |  |  |  | 			Rect const& dest_rect | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void DrawTextLayout( | 
					
						
							| 
									
										
										
										
											2019-08-15 11:22:51 +08:00
										 |  |  |  | 			TextLayout const& layout | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void SetOpacity( | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 			float opacity | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void SetTransform( | 
					
						
							| 
									
										
										
										
											2019-08-14 23:36:29 +08:00
										 |  |  |  | 			const Matrix3x2& matrix | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void SetTextStyle( | 
					
						
							| 
									
										
										
										
											2019-08-03 23:28:45 +08:00
										 |  |  |  | 			float opacity, | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 			const Color& color, | 
					
						
							|  |  |  |  | 			bool has_outline, | 
					
						
							|  |  |  |  | 			const Color& outline_color, | 
					
						
							|  |  |  |  | 			float outline_width, | 
					
						
							|  |  |  |  | 			StrokeStyle outline_stroke | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void PushClip( | 
					
						
							| 
									
										
										
										
											2019-08-14 23:36:29 +08:00
										 |  |  |  | 			const Matrix3x2& clip_matrix, | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 			const Size& clip_size | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void PopClip(); | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void PushLayer( | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 			ComPtr<ID2D1Layer> const& layer, | 
					
						
							|  |  |  |  | 			LayerProperties const& properties | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void PopLayer(); | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void Resize( | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 			UINT width, | 
					
						
							|  |  |  |  | 			UINT height | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 00:28:25 +08:00
										 |  |  |  | 		bool CheckVisibility( | 
					
						
							|  |  |  |  | 			Size const& content_size, | 
					
						
							| 
									
										
										
										
											2019-08-14 23:36:29 +08:00
										 |  |  |  | 			Matrix3x2 const& transform | 
					
						
							| 
									
										
										
										
											2019-08-14 00:28:25 +08:00
										 |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-30 13:32:10 +08:00
										 |  |  |  | 	public: | 
					
						
							| 
									
										
										
										
											2019-08-12 14:51:54 +08:00
										 |  |  |  | 		void SetupComponent() override; | 
					
						
							| 
									
										
										
										
											2019-07-30 13:32:10 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 		void DestroyComponent() override; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		void BeforeRender() override; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		void AfterRender() override; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		void HandleMessage(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) override; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		void SetCollectingStatus(bool collecting); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 	public: | 
					
						
							| 
									
										
										
										
											2019-07-30 00:41:06 +08:00
										 |  |  |  | 		struct Status | 
					
						
							|  |  |  |  | 		{ | 
					
						
							|  |  |  |  | 			Time start; | 
					
						
							|  |  |  |  | 			Duration duration; | 
					
						
							|  |  |  |  | 			int primitives; | 
					
						
							|  |  |  |  | 		}; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		inline HWND						GetTargetWindow() const			{ return hwnd_; } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		inline Status const&			GetStatus() const				{ return status_; } | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-30 00:41:06 +08:00
										 |  |  |  | 		inline Size const&				GetOutputSize() const			{ return output_size_; } | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-13 21:16:38 +08:00
										 |  |  |  | 		inline ID2DDeviceResources*		GetD2DDeviceResources() const	{ KGE_ASSERT(d2d_res_); return d2d_res_.get(); } | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-13 21:16:38 +08:00
										 |  |  |  | 		inline ID3DDeviceResources*		GetD3DDeviceResources() const	{ KGE_ASSERT(d3d_res_); return d3d_res_.get(); } | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-13 21:16:38 +08:00
										 |  |  |  | 		inline ITextRenderer*			GetTextRenderer() const			{ KGE_ASSERT(text_renderer_); return text_renderer_.get(); } | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-13 21:16:38 +08:00
										 |  |  |  | 		inline ID2D1SolidColorBrush*	GetSolidColorBrush() const		{ KGE_ASSERT(solid_color_brush_); return solid_color_brush_.get(); } | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 	private: | 
					
						
							|  |  |  |  | 		Renderer(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		~Renderer(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		HRESULT CreateDeviceResources(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		HRESULT HandleDeviceLost(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-30 13:32:10 +08:00
										 |  |  |  | 		HRESULT BeginDraw(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		HRESULT EndDraw(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 		void IncreasePrimitivesCount(); | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-14 08:52:01 +08:00
										 |  |  |  | 	private: | 
					
						
							|  |  |  |  | 		bool			vsync_; | 
					
						
							|  |  |  |  | 		bool			antialias_; | 
					
						
							|  |  |  |  | 		bool			collecting_status_; | 
					
						
							|  |  |  |  | 		float			opacity_; | 
					
						
							|  |  |  |  | 		HWND			hwnd_; | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 		Size			output_size_; | 
					
						
							|  |  |  |  | 		Color			clear_color_; | 
					
						
							|  |  |  |  | 		TextAntialias	text_antialias_; | 
					
						
							| 
									
										
										
										
											2019-07-30 00:41:06 +08:00
										 |  |  |  | 		Status			status_; | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-30 00:41:06 +08:00
										 |  |  |  | 		ComPtr<ID2DDeviceResources>		d2d_res_; | 
					
						
							|  |  |  |  | 		ComPtr<ID3DDeviceResources>		d3d_res_; | 
					
						
							| 
									
										
										
										
											2019-03-31 01:37:06 +08:00
										 |  |  |  | 		ComPtr<ID2D1DeviceContext>		device_context_; | 
					
						
							|  |  |  |  | 		ComPtr<ID2D1DrawingStateBlock>	drawing_state_block_; | 
					
						
							|  |  |  |  | 		ComPtr<ITextRenderer>			text_renderer_; | 
					
						
							|  |  |  |  | 		ComPtr<ID2D1SolidColorBrush>	solid_color_brush_; | 
					
						
							|  |  |  |  | 	}; | 
					
						
							|  |  |  |  | } |