Class: AxPixelFormat

AxPixelFormat(numChannels, sizeInBytes, channel0BitCount, channel1BitCount, channel2BitCount, channel3BitCount, channel0Id, channel1Id, channel2Id, channel3Id)

new AxPixelFormat(numChannels, sizeInBytes, channel0BitCount, channel1BitCount, channel2BitCount, channel3BitCount, channel0Id, channel1Id, channel2Id, channel3Id)

Represents a pixel color format The format may have up to four channels - Red, Green, Blue and Alpha, freely arranged, each with an arbitrary number of bits
Parameters:
Name Type Description
numChannels Integer The total number of color channels in the format
sizeInBytes Integer The total size in bytes for the color, including any padding bits
channel0BitCount Integer The number of bits used by color channel 0
channel1BitCount Integer The number of bits used by color channel 1
channel2BitCount Integer The number of bits used by color channel 2
channel3BitCount Integer The number of bits used by color channel 3
channel0Id Integer The color identifier for color channel 0
channel1Id Integer The color identifier for color channel 1
channel2Id Integer The color identifier for color channel 2
channel3Id Integer The color identifier for color channel 3
Source:

Methods

Equals(pixelFormat) → {Boolean}

Compares against another pixel color format for equality
Parameters:
Name Type Description
pixelFormat AxPixelFormat The color formt to compare against
Source:
Returns:
True if equal to the given color format
Type
Boolean

FindChannelIdBitOffset(channelId) → {Integer}

Searches for the offset in bits of the given channel id
Parameters:
Name Type Description
channelId Integer The identifier to search for
Source:
Returns:
The offset in bits of the given channel id. If there is no such channel, return -1
Type
Integer

FindChannelIdIndex(channelId) → {Integer}

Searches for the index of the given channel id
Parameters:
Name Type Description
channelId Integer The identifier to search for
Source:
Returns:
The index of the channel holding the given color. If there is no such channel, return -1
Type
Integer

HSLToRGB(result, hlsValues)

Converts a color in HSL format to RGB format
Parameters:
Name Type Description
result Float32Array A Float32Array with 3 or more elements to hold the resulting red, green and blue values in that order
hlsValues Float32Array A Float32Array with the hue, saturation and lightness values in that order, which are to be converted
Source:

HueToRGB(result, hue)

Returns the red, green and blue values of a given hue The returned RGB are pure values, unbiased by saturation and lightness. Effectively, these are the values at the hue at full saturation and neutral lightness (middle)
Parameters:
Name Type Description
result Float32Array A Float32Array with 3 or more elements to hold the resulting red, green and blue values in that order
hue Number The hue to get RGB values for
Source:

RGBToHSL(result, rgbValues)

Converts a color in RGB format to HSL format
Parameters:
Name Type Description
result Float32Array A Float32Array with 3 or more elements to hold the resulting hue, saturation and lightness values in that order
rgbValues Float32Array A Float32Array with the red, green and blue values in that order, which are to be converted
Source:

Documentation generated by JSDoc 3.5.3 on Wed Jul 26 2017 18:59:51 GMT+0300 (FLE Daylight Time)