32 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			MQL5
		
	
	
	
	
	
		
		
			
		
	
	
			32 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			MQL5
		
	
	
	
	
	
| 
								 | 
							
								//+------------------------------------------------------------------+
							 | 
						||
| 
								 | 
							
								//|                                                       Canvas.mqh |
							 | 
						||
| 
								 | 
							
								//|                                  Copyright 2025, Niquel Mendoza. |
							 | 
						||
| 
								 | 
							
								//|                     https://www.mql5.com/es/users/nique_372/news |
							 | 
						||
| 
								 | 
							
								//+------------------------------------------------------------------+
							 | 
						||
| 
								 | 
							
								#property copyright "Copyright 2025, Niquel Mendoza."
							 | 
						||
| 
								 | 
							
								#property link      "https://www.mql5.com/es/users/nique_372/news"
							 | 
						||
| 
								 | 
							
								#property strict
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#ifndef CANVAS_CANVAS_CUSTOM_BY_LEO_MQH
							 | 
						||
| 
								 | 
							
								#define CANVAS_CANVAS_CUSTOM_BY_LEO_MQH
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#include <Canvas\\Canvas.mqh>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								//+------------------------------------------------------------------+
							 | 
						||
| 
								 | 
							
								//|                                                                  |
							 | 
						||
| 
								 | 
							
								//+------------------------------------------------------------------+
							 | 
						||
| 
								 | 
							
								class CCanvasCustom : public CCanvas
							 | 
						||
| 
								 | 
							
								 {
							 | 
						||
| 
								 | 
							
								public:
							 | 
						||
| 
								 | 
							
								  __forceinline ENUM_OBJECT ObjectType() const { return m_objtype; }
							 | 
						||
| 
								 | 
							
								  __forceinline bool TextOuTF(int x, int y, string text, const uint clr, uint alignment = 0) { return ::TextOut(text, x, y, alignment, m_pixels, m_width, m_height, clr, m_format);}
							 | 
						||
| 
								 | 
							
								  void               GetPixelsArray(uint& out_array_pixels[]) const;
							 | 
						||
| 
								 | 
							
								 };
							 | 
						||
| 
								 | 
							
								//+------------------------------------------------------------------+
							 | 
						||
| 
								 | 
							
								void CCanvasCustom::GetPixelsArray(uint &out_array_pixels[]) const
							 | 
						||
| 
								 | 
							
								 {
							 | 
						||
| 
								 | 
							
								  ::ArrayCopy(out_array_pixels, m_pixels);
							 | 
						||
| 
								 | 
							
								 }
							 | 
						||
| 
								 | 
							
								//+------------------------------------------------------------------+
							 | 
						||
| 
								 | 
							
								#endif 
							 |