/// <summary> /// Constructs a WritableRaster with the given SampleModel. The /// WritableRaster's upper left corner is origin and it is the /// same size as the SampleModel. A DataBuffer large enough to /// describe the WritableRaster is automatically created. </summary> /// <param name="sampleModel"> The SampleModel that specifies the layout. </param> /// <param name="origin"> The Point that specifies the origin. </param> /// <exception cref="RasterFormatException"> if computing either /// <code>origin.x + sampleModel.getWidth()</code> or /// <code>origin.y + sampleModel.getHeight()</code> results /// in integer overflow </exception> protected internal WritableRaster(SampleModel sampleModel, Point origin) : this(sampleModel, sampleModel.CreateDataBuffer(), new Rectangle(origin.x, origin.y, sampleModel.Width, sampleModel.Height), origin, null) { }