Esempio n. 1
0
		/// <summary>
		/// This method is called when the render quality is set to low.
		/// </summary>
		/// <param name="graphics">
		/// The graphics context associated with this paint context.
		/// </param>
		/// <param name="canvas">The canvas that this paint context will render on.</param>
		/// <remarks>
		/// Override this method to change how the low render quality is set.
		/// </remarks>
		protected virtual void OnLowRenderQuality(Graphics graphics, PCanvas canvas) {
			// Set default low quality flags.
			graphics.InterpolationMode = InterpolationMode.Low;
			graphics.SmoothingMode = SmoothingMode.HighSpeed;
			graphics.TextRenderingHint = GridFitText ? TextRenderingHint.SingleBitPerPixelGridFit
				: TextRenderingHint.SingleBitPerPixel;
			graphics.CompositingQuality = CompositingQuality.HighSpeed;
			graphics.PixelOffsetMode = PixelOffsetMode.HighSpeed;

			// Notify the canvas.
			if (canvas != null && canvas.LowRenderQuality != null) {
				canvas.LowRenderQuality(graphics);
			}
		}
Esempio n. 2
0
		/// <summary>
		/// This method is called when the render quality is set to low.
		/// </summary>
		/// <param name="graphics">
		/// The graphics context associated with this paint context.
		/// </param>
		/// <param name="canvas">The canvas that this paint context will render on.</param>
		/// <remarks>
		/// Override this method to change how the low render quality is set.
		/// </remarks>
		protected virtual void OnLowRenderQuality(Graphics graphics, PCanvas canvas) {
			// Set default low quality flags.
			graphics.InterpolationMode = InterpolationMode.Low;
			graphics.SmoothingMode = SmoothingMode.HighSpeed;
			graphics.TextRenderingHint = GridFitText ? TextRenderingHint.SingleBitPerPixelGridFit
				: TextRenderingHint.SingleBitPerPixel;
			graphics.CompositingQuality = CompositingQuality.HighSpeed;
			graphics.PixelOffsetMode = PixelOffsetMode.HighSpeed;

			// Notify the canvas.
			if (canvas != null && canvas.LowRenderQuality != null) {
				canvas.LowRenderQuality(graphics);
			}
		}