texture_fill_region
Scans a contiguous region of a source texture element, writing a fill into a target texture element wherever source is within tolerance.
arguments
- "fill" : Data
The fill written to the target texture element. This may be either an INumber, ICompound or IColor. INumber and IColor will be written to the target texture element directly and any channels not specified will be populated by zeroes. IColor will be scaled to the target pixel type if necessary and use full opacity.
- "fill_position" : Float32<2>
The x, y coordinate on the source texture element used as the origin of the region fill. Matching pixels connected to the origin point will be overwritten in the target texture element by the the fill.
- "normalized_coordinates" : Boolean (default: false)
Whether texture coordinates provided to this command refer to pixels (normalized:false) in the range of [0, width-1] and [0,height-1] or whether the coordinates are specified as UVs (normalized:true) in the range of [0,1).
- "sample_filter" : String (default: "sphere")
The sampling filter used to determine whether a connected pixel matches the pixel sampled at the origin point. The filters available are 'box', 'sphere' and 'angle'. Box will compare each channel independently and only fill pixels where the difference between channels is less than or equal to the tolerance value. Sphere will calculate the euclidean distance between pixels and only fill pixels where the distance between them is less than or equal to the tolerance value. Angle will calculate the angle between the pixel data once normalised and only fill pixels where the angle is less than or equal to the floating point tolerance value in radians.
- "source_texture_name" : String
The source texture element used to determine the region to be filled.
- "target_texture_name" : String
The target texture element that will be written with the specified fill.
- "tolerance" : Data (default: 0)
The tolerance value used to determine whether a connected pixel matches the pixel sampled at the origin point. This value can be provided as either the component type of the source texture element or a float depending on sample_filter in use.