Esempio n. 1
0
 protected virtual awt.PaintContext createContextInternal(image.ColorModel cm,
                                                          awt.Rectangle deviceBounds, geom.Rectangle2D userBounds, geom.AffineTransform xform,
                                                          awt.RenderingHints hints)
 {
     Matrix.Multiply(xform, _brushTransform.NativeObject, MatrixOrder.Append);
     return(NativeObject.createContext(cm, deviceBounds, userBounds, xform, hints));
 }
Esempio n. 2
0
 awt.PaintContext awt.Paint.createContext(image.ColorModel cm,
                                          awt.Rectangle deviceBounds, geom.Rectangle2D userBounds, geom.AffineTransform xform,
                                          awt.RenderingHints hints)
 {
     return(createContextInternal(cm, deviceBounds, userBounds, xform, hints));
 }
		/// <summary>
		/// Constructs a new <code>BufferedImage</code> with a specified
		/// <code>ColorModel</code> and <code>Raster</code>.
		/// </summary>
		public BufferedImage(ColorModel @cm, WritableRaster @raster, bool @isRasterPremultiplied, Hashtable @properties)
		{
		}
Esempio n. 4
0
		public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize)
		{
			int[] pixeli = new int[pixels.Length];
			for (int i = 0; i < pixels.Length; i++)
			{
				pixeli[i] = model.getRGB(pixels[i] & 0xff);
			}
			setPixels(x, y, w, h, model, pixeli, off, scansize);
		}
Esempio n. 5
0
 public void setColorModel(ColorModel model)
 {
     mColorModel = model;
 }
Esempio n. 6
0
		public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize)
		{
			if (x <= 0 || y <= 0 || w <= 0 || h <= 0 || off < 0)
			{
				// should we report an error?
				return;
			}
			long length = w * h;
			if (length > pixels.Length - off)
			{
				// should we report an error?
				return;
			}
			lock (mBitmap)
			{
				BitmapData data = mBitmap.LockBits(new Rectangle(x, y, w, h), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
				System.Runtime.InteropServices.Marshal.Copy(pixels, off, data.Scan0, data.Width * data.Height);
				mBitmap.UnlockBits(data);
			}
		}
 /// <summary>
 /// Constructs a new <code>BufferedImage</code> with a specified
 /// <code>ColorModel</code> and <code>Raster</code>.
 /// </summary>
 public BufferedImage(ColorModel @cm, WritableRaster @raster, bool @isRasterPremultiplied, Hashtable @properties)
 {
 }