| 
									
										
										
										
											2018-11-08 21:39:26 +08:00
										 |  |  |  | // Copyright (c) 2016-2018 Easy2D - Nomango
 | 
					
						
							|  |  |  |  | // 
 | 
					
						
							|  |  |  |  | // 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 "Node.h"
 | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | #include "Font.hpp"
 | 
					
						
							|  |  |  |  | #include "TextStyle.hpp"
 | 
					
						
							| 
									
										
										
										
											2019-03-14 17:55:06 +08:00
										 |  |  |  | #include "../renderer/TextRenderer.h"
 | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | #undef DrawText
 | 
					
						
							| 
									
										
										
										
											2018-11-08 21:39:26 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | namespace easy2d | 
					
						
							|  |  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 	// <20><><EFBFBD><EFBFBD>
 | 
					
						
							| 
									
										
										
										
											2019-02-09 00:03:24 +08:00
										 |  |  |  | 	class E2D_API Canvas | 
					
						
							| 
									
										
										
										
											2019-03-10 13:44:02 +08:00
										 |  |  |  | 		: public VisualNode | 
					
						
							| 
									
										
										
										
											2018-11-08 21:39:26 +08:00
										 |  |  |  | 	{ | 
					
						
							|  |  |  |  | 	public: | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 		Canvas(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		Canvas( | 
					
						
							|  |  |  |  | 			Size const& size | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		Canvas( | 
					
						
							|  |  |  |  | 			float width, | 
					
						
							|  |  |  |  | 			float height | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		virtual ~Canvas(); | 
					
						
							| 
									
										
										
										
											2018-11-08 21:39:26 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 		// <20><>ʼ<EFBFBD><CABC>ͼ
 | 
					
						
							|  |  |  |  | 		void BeginDraw(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ
 | 
					
						
							|  |  |  |  | 		void EndDraw(); | 
					
						
							| 
									
										
										
										
											2018-11-08 21:39:26 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><>ֱ<EFBFBD><D6B1>
 | 
					
						
							|  |  |  |  | 		void DrawLine( | 
					
						
							|  |  |  |  | 			const Point& begin, | 
					
						
							|  |  |  |  | 			const Point& end | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><>Բ<EFBFBD>α߿<CEB1>
 | 
					
						
							|  |  |  |  | 		void DrawCircle( | 
					
						
							|  |  |  |  | 			const Point& center, | 
					
						
							|  |  |  |  | 			float radius | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD>Բ<EFBFBD>α߿<CEB1>
 | 
					
						
							|  |  |  |  | 		void DrawEllipse( | 
					
						
							|  |  |  |  | 			const Point& center, | 
					
						
							|  |  |  |  | 			float radius_x, | 
					
						
							|  |  |  |  | 			float radius_y | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD>α߿<CEB1>
 | 
					
						
							|  |  |  |  | 		void DrawRect( | 
					
						
							|  |  |  |  | 			const Rect& rect | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><>Բ<EFBFBD>Ǿ<EFBFBD><C7BE>α߿<CEB1>
 | 
					
						
							|  |  |  |  | 		void DrawRoundedRect( | 
					
						
							|  |  |  |  | 			const Rect& rect, | 
					
						
							|  |  |  |  | 			float radius_x, | 
					
						
							|  |  |  |  | 			float radius_y | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 		// <20><>ͼƬ
 | 
					
						
							|  |  |  |  | 		void DrawImage( | 
					
						
							| 
									
										
										
										
											2019-01-22 21:58:01 +08:00
										 |  |  |  | 			ImagePtr const& image, | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 			float opacity = 1.f | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
					
						
							|  |  |  |  | 		void DrawText( | 
					
						
							| 
									
										
										
										
											2019-01-21 21:24:45 +08:00
										 |  |  |  | 			String const& text,		/* <20><><EFBFBD><EFBFBD> */ | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 			Point const& point		/* <20><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB> */ | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-20 15:18:54 +08:00
										 |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD>α߿<CEB1>
 | 
					
						
							|  |  |  |  | 		void DrawGeometry( | 
					
						
							| 
									
										
										
										
											2019-01-22 21:58:01 +08:00
										 |  |  |  | 			GeometryPtr const& geo | 
					
						
							| 
									
										
										
										
											2018-11-20 15:18:54 +08:00
										 |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-08 21:39:26 +08:00
										 |  |  |  | 		// <20><><EFBFBD><EFBFBD>Բ<EFBFBD><D4B2>
 | 
					
						
							|  |  |  |  | 		void FillCircle( | 
					
						
							|  |  |  |  | 			const Point& center, | 
					
						
							|  |  |  |  | 			float radius | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><D4B2>
 | 
					
						
							|  |  |  |  | 		void FillEllipse( | 
					
						
							|  |  |  |  | 			const Point& center, | 
					
						
							|  |  |  |  | 			float radius_x, | 
					
						
							|  |  |  |  | 			float radius_y | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
					
						
							|  |  |  |  | 		void FillRect( | 
					
						
							|  |  |  |  | 			const Rect& rect | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD>Բ<EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD>
 | 
					
						
							|  |  |  |  | 		void FillRoundedRect( | 
					
						
							|  |  |  |  | 			const Rect& rect, | 
					
						
							|  |  |  |  | 			float radius_x, | 
					
						
							|  |  |  |  | 			float radius_y | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-20 15:18:54 +08:00
										 |  |  |  | 		// <20><><EFBFBD>伸<EFBFBD><E4BCB8>ͼ<EFBFBD><CDBC>
 | 
					
						
							|  |  |  |  | 		void FillGeometry( | 
					
						
							| 
									
										
										
										
											2019-01-22 21:58:01 +08:00
										 |  |  |  | 			GeometryPtr const& geo | 
					
						
							| 
									
										
										
										
											2018-11-20 15:18:54 +08:00
										 |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 		// <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
 | 
					
						
							|  |  |  |  | 		void BeginPath( | 
					
						
							|  |  |  |  | 			Point const& begin_pos	/* ·<><C2B7><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC> */ | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
 | 
					
						
							|  |  |  |  | 		void EndPath( | 
					
						
							|  |  |  |  | 			bool closed = true		/* ·<><C2B7><EFBFBD>Ƿ<EFBFBD><C7B7>պ<EFBFBD> */ | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>߶<EFBFBD>
 | 
					
						
							|  |  |  |  | 		void AddLine( | 
					
						
							|  |  |  |  | 			Point const& point		/* <20>˵<EFBFBD> */ | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD>߶<EFBFBD>
 | 
					
						
							|  |  |  |  | 		void AddLines( | 
					
						
							| 
									
										
										
										
											2019-01-21 21:24:45 +08:00
										 |  |  |  | 			Array<Point> const& points | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>η<EFBFBD><CEB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
					
						
							|  |  |  |  | 		void AddBezier( | 
					
						
							|  |  |  |  | 			Point const& point1,	/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߵĵ<DFB5>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD> */ | 
					
						
							|  |  |  |  | 			Point const& point2,	/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߵĵڶ<C4B5><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD> */ | 
					
						
							|  |  |  |  | 			Point const& point3		/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5>յ<EFBFBD> */ | 
					
						
							| 
									
										
										
										
											2018-11-17 17:15:32 +08:00
										 |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-20 15:56:56 +08:00
										 |  |  |  | 		// <20><><EFBFBD>ӻ<EFBFBD><D3BB><EFBFBD>
 | 
					
						
							|  |  |  |  | 		void AddArc( | 
					
						
							|  |  |  |  | 			Point const& point,		/* <20>յ<EFBFBD> */ | 
					
						
							|  |  |  |  | 			Point const& radius,	/* <20><>Բ<EFBFBD>뾶 */ | 
					
						
							|  |  |  |  | 			float rotation,			/* <20><>Բ<EFBFBD><D4B2>ת<EFBFBD>Ƕ<EFBFBD> */ | 
					
						
							|  |  |  |  | 			bool clockwise = true,	/* ˳ʱ<CBB3><CAB1> or <20><>ʱ<EFBFBD><CAB1> */ | 
					
						
							|  |  |  |  | 			bool is_small = true	/* <20>Ƿ<EFBFBD>ȡС<C8A1><D0A1> 180<38><30> <20>Ļ<EFBFBD> */ | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 		// ·<><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
					
						
							|  |  |  |  | 		void StrokePath(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// ·<><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
					
						
							|  |  |  |  | 		void FillPath(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-19 12:57:44 +08:00
										 |  |  |  | 		// <20><><EFBFBD>ջ<EFBFBD><D5BB><EFBFBD>
 | 
					
						
							|  |  |  |  | 		void Clear(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-17 17:15:32 +08:00
										 |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
 | 
					
						
							|  |  |  |  | 		void SetFillColor( | 
					
						
							|  |  |  |  | 			const Color& color | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
 | 
					
						
							|  |  |  |  | 		void SetStrokeColor( | 
					
						
							|  |  |  |  | 			const Color& color | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-17 17:15:32 +08:00
										 |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
					
						
							|  |  |  |  | 		void SetStrokeWidth( | 
					
						
							|  |  |  |  | 			float width | 
					
						
							|  |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ཻ<EFBFBD><E0BDBB>ʽ
 | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 		void SetOutlineJoinStyle( | 
					
						
							|  |  |  |  | 			StrokeStyle outline_join | 
					
						
							| 
									
										
										
										
											2018-11-17 17:15:32 +08:00
										 |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 		// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD>ˢ<EFBFBD><CBA2>ʽ
 | 
					
						
							|  |  |  |  | 		void SetTextStyle( | 
					
						
							|  |  |  |  | 			Font const& font, | 
					
						
							|  |  |  |  | 			TextStyle const& text_style | 
					
						
							|  |  |  |  | 		); | 
					
						
							| 
									
										
										
										
											2018-11-17 17:15:32 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
 | 
					
						
							|  |  |  |  | 		Color GetFillColor() const; | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 		// <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
 | 
					
						
							|  |  |  |  | 		Color GetStrokeColor() const; | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-17 17:15:32 +08:00
										 |  |  |  | 		// <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
					
						
							|  |  |  |  | 		float GetStrokeWidth() const; | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 		// <20>任<EFBFBD><E4BBBB><EFBFBD><EFBFBD>
 | 
					
						
							|  |  |  |  | 		void SetBrushTransform( | 
					
						
							| 
									
										
										
										
											2018-11-25 15:00:15 +08:00
										 |  |  |  | 			Matrix const& transform | 
					
						
							| 
									
										
										
										
											2018-11-17 17:15:32 +08:00
										 |  |  |  | 		); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 		// <20><><EFBFBD><EFBFBD>ΪͼƬ
 | 
					
						
							| 
									
										
										
										
											2019-01-22 21:58:01 +08:00
										 |  |  |  | 		ImagePtr ExportToImage() const; | 
					
						
							| 
									
										
										
										
											2018-11-17 17:15:32 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-26 17:18:31 +08:00
										 |  |  |  | 		void OnRender() override; | 
					
						
							| 
									
										
										
										
											2018-11-17 17:15:32 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 	protected: | 
					
						
							| 
									
										
										
										
											2019-03-10 13:44:02 +08:00
										 |  |  |  | 		ComPtr<ID2D1Bitmap> const& GetBitmap() const; | 
					
						
							| 
									
										
										
										
											2018-11-18 20:26:41 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 	protected: | 
					
						
							| 
									
										
										
										
											2019-01-24 12:21:01 +08:00
										 |  |  |  | 		float						stroke_width_; | 
					
						
							|  |  |  |  | 		Font						text_font_; | 
					
						
							|  |  |  |  | 		TextStyle					text_style_; | 
					
						
							| 
									
										
										
										
											2019-03-10 13:44:02 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 		ComPtr<ID2D1PathGeometry>		current_geometry_; | 
					
						
							|  |  |  |  | 		ComPtr<ID2D1GeometrySink>		current_sink_; | 
					
						
							|  |  |  |  | 		ComPtr<ID2D1StrokeStyle>		outline_join_style_; | 
					
						
							|  |  |  |  | 		ComPtr<ID2D1SolidColorBrush>	fill_brush_; | 
					
						
							|  |  |  |  | 		ComPtr<ID2D1SolidColorBrush>	stroke_brush_; | 
					
						
							|  |  |  |  | 		ComPtr<IDWriteTextFormat>		text_format_; | 
					
						
							|  |  |  |  | 		ComPtr<ITextRenderer>			text_renderer_; | 
					
						
							|  |  |  |  | 		ComPtr<ID2D1BitmapRenderTarget>	render_target_; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 		mutable bool					cache_expired_; | 
					
						
							|  |  |  |  | 		mutable ComPtr<ID2D1Bitmap>		bitmap_cached_; | 
					
						
							| 
									
										
										
										
											2018-11-08 21:39:26 +08:00
										 |  |  |  | 	}; | 
					
						
							|  |  |  |  | } |