IWritableBitmapData Interface

KGy SOFT Drawing Libraries Help
Represents a writable IBitmapData instance. To create an instance use the BitmapDataFactory class or the BitmapExtensions.GetWritableBitmapData extension method.
See the Remarks section of the GetReadWriteBitmapData method for details and examples.

Namespace:  KGySoft.Drawing.Imaging
Assembly:  KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 5.2.0
Syntax

public interface IWritableBitmapData : IBitmapData, 
	IDisposable

The IWritableBitmapData type exposes the following members.

Properties

  NameDescription
Public propertyAlphaThreshold
If this IBitmapData represents a bitmap with single bit alpha or with a palette that has a transparent color, then gets a threshold value for the Color32.A property, under which the color is considered transparent. If 0, then the pixels to be set will never be transparent.
(Inherited from IBitmapData.)
Public propertyBackColor
When accessing pixels of indexed bitmaps, or setting pixels of bitmaps without alpha support, it gets the color of the background. For example, when setting color values with alpha, which are considered opaque the color to set will be blended with this color before setting the pixel.
See the Remarks section of the GetReadWriteBitmapData extension method for details and examples.
(Inherited from IBitmapData.)
Public propertyFirstRow
Gets an IWritableBitmapDataRow instance representing the first row of the current IWritableBitmapData. Subsequent rows can be accessed by calling the MoveNextRow method on the returned instance while it returns . Alternatively, you can use the indexer to obtain any row.
See the Examples section of the GetReadWriteBitmapData method for examples.
Public propertyHeight
Gets the height of the current IBitmapData instance in pixels.
(Inherited from IBitmapData.)
Public propertyItem
Gets an IWritableBitmapDataRow representing the row of the specified y coordinate in the current IWritableBitmapData.
See the Examples section of the GetReadWriteBitmapData method for examples.
Public propertyPalette
Gets a Palette instance representing the colors of the owner Bitmap if it has an indexed PixelFormat, or  if the owner Bitmap is not an indexed one. For indexed bitmaps the PixelFormat property returns Format8bppIndexed, Format4bppIndexed or Format1bppIndexed.
(Inherited from IBitmapData.)
Public propertyPixelFormat
Gets the PixelFormat of the current IBitmapData instance.
See the Remarks section for details.
(Inherited from IBitmapData.)
Public propertyRowSize
Gets the size of a row in bytes, or zero, if this IBitmapData instance does not have an actual raw buffer to access. Otherwise, RowSize is similar to BitmapData.Stride but this property never returns a negative value.
See the Remarks section for details.
(Inherited from IBitmapData.)
Public propertyWidth
Gets the width of the current IBitmapData instance in pixels.
(Inherited from IBitmapData.)
Top
Methods

  NameDescription
Public methodSetPixel
Sets the color of the pixel at the specified coordinates.
See the Remarks section for details.
Top
Extension Methods

  NameDescription
Public Extension MethodClear
Clears the content of the specified bitmapData and fills it with the specified color.
This method is similar to Graphics.Clear except that this one supports any PixelFormat and also dithering.
(Defined by BitmapDataExtensions.)
Public Extension MethodClip
Clips the specified source using the specified clippingRegion. Unlike the Clone methods, this one returns a wrapper, providing access only to the specified region of the original source.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Public Extension MethodTrySetPalette
Tries to the set the specified palette for this IWritableBitmapData.
See the Remarks section for details.
(Defined by BitmapDataExtensions.)
Top
See Also

Reference