Exemplo n.º 1
0
		/// <summary>
		/// Initializes a new <see cref="ColorBarGraphic"/> with the specified physical dimensions and orientation.
		/// </summary>
		/// <param name="size">The desired physical size of the colour bar.</param>
		/// <param name="orientation">A value specifying the desired orientation of the colour bar.</param>
		public ColorBarGraphic(Size size, ColorBarOrientation orientation)
		{
			_size = size;
			_location = new PointF(0, 0);
			_orientation = orientation;
			_reversed = false;
			_gradientPixelData = null;
			_colorMapManagerProxy = new ColorMapManager(new ColorMapInstallerProxy());
		}
Exemplo n.º 2
0
		/// <summary>
		/// Cloning constructor.
		/// </summary>
		/// <param name="source">The source object from which to clone.</param>
		/// <param name="context">The cloning context object.</param>
		protected ColorBarGraphic(ColorBarGraphic source, ICloningContext context)
		{
			context.CloneFields(source, this);

			_colorMapManagerProxy = new ColorMapManager(new ColorMapInstallerProxy());
			if (source._colorMapManagerProxy.ColorMap != null)
				_colorMapManagerProxy.SetMemento(source._colorMapManagerProxy.CreateMemento());

			if (source._gradientPixelData != null)
				_gradientPixelData = source._gradientPixelData.Clone();
		}