Capabilities for a layer
typedef struct {
    unsigned int    format;
    long            owner;
    unsigned int    caps;
    unsigned int    alpha_caps;
    unsigned int    alpha_combine_caps;
    unsigned int    chroma_caps;
    int     max_data_width;
    int     max_data_height;
    int     max_src_width;
    int     max_src_height;
    int     max_dst_width;
    int     max_dst_height;
    int     min_dst_width;
    int     min_dst_height;
    int     max_x_scale;
    int     max_y_scale;
    int     min_x_scale;
    int     min_y_scale;
    unsigned int    reserved[4];
} PgLayerCaps_t;
The PgLayerCaps_t structure describes the capabilities of a
layer.
To fill in this structure for a layer, call
PgGetLayerCaps().
To set the capabilities, call
PgSetLayerArg().
The members of the PgLayerCaps_t structure include:
- format
 
- The layer format that corresponds to the format index that you pass
  to PgGetLayerCaps(); one of:
  
- Pg_LAYER_FORMAT_PAL8
    
  
 
- Pg_LAYER_FORMAT_ARGB1555
  
 
- Pg_LAYER_FORMAT_RGB565
  
 
- Pg_LAYER_FORMAT_RGB888
  
 
- Pg_LAYER_FORMAT_ARGB8888
  
 
- Pg_LAYER_FORMAT_YUY2
  
 
- Pg_LAYER_FORMAT_UYVY
  
 
- Pg_LAYER_FORMAT_YVYU
  
 
- Pg_LAYER_FORMAT_V422
  
 
- Pg_LAYER_FORMAT_YVU9
  
 
- Pg_LAYER_FORMAT_YV12
  
 
- Pg_LAYER_FORMAT_YUV420
  
 
 
- owner
 
- The Photon client ID of the owner, if the surface is locked.
 
- caps
 
- General capabilities; a combination of the following:
  
- Pg_LAYER_CAP_DISABLE  --  the layer can be hidden.
    
  
 
- Pg_LAYER_CAP_PAN_SOURCE  --  
    the offset of the displayed image from the source image can be changed.
  
 
- Pg_LAYER_CAP_PAN_DEST  --  
    the layer's window on the screen can be moved.
  
 
- Pg_LAYER_CAP_SIZE_DEST  --  
    the layer's window on the screen can be resized.
    
  
 
- Pg_LAYER_CAP_EDGE_CLAMP  --  
    the last pixel of the source data can be replicated
    downwards/rightwards if the source viewport is
    scrolled past the bottom/right of the source data.
  
 
- Pg_LAYER_CAP_EDGE_WRAP  --  
    the source data can be wrapped from the top/left if the 
    source viewport is scrolled past the bottom/right
    of the source data.
  
 
- Pg_LAYER_CAP_SET_BRIGHTNESS  --  
    the layer's brightness can be changed.
  
 
- Pg_LAYER_CAP_SET_CONTRAST  --  
    the layer's contrast can be changed.
  
 
- Pg_LAYER_CAP_SET_SATURATION  --  
    the layer's saturation can be changed.
  
 
- Pg_LAYER_CAP_ALPHA_WITH_CHROMA  --  
    this layer supports simultaneous alpha blending and chroma-keying.
  
 
- Pg_LAYER_CAP_SCALE_REPLICATE  -- 
    scaling by pixel replication is supported.
  
 
- Pg_LAYER_CAP_FILTER  --  
    filtering is supported.
  
 
- Pg_LAYER_CAP_MAIN_DISPLAY  --  
    this layer is the screen's primary display.
    This layer's destination viewport is fixed to the physical screen size.
    This layer's format is fixed to the current video mode.
  
 
 
- alpha_caps
 
- Alpha capabilities.
  Only global and per-pixel alpha blending are currently supported.
  Alpha maps aren't supported for blending between layers. 
  
  
- Pg_LAYER_ALPHA_M1_SRC_PIXEL_ALPHA  --  
    The primary alpha multiplier "M1" comes from the source pixels alpha component.
    Not valid if the source pixel format does not include an alpha component.
  
 
- Pg_LAYER_ALPHA_M1_DST_PIXEL_ALPHA  -- 
   The primary alpha multiplier "M1" comes from the destination pixels alpha component
   Not valid if the destination pixel format does not include an alpha component.  
  
 
- Pg_LAYER_ALPHA_M1_GLOBAL  -- 
   The primary alpha multiplier "M1" comes from global multiplier 1.
  
 
- Pg_LAYER_ALPHA_M2_SRC_PIXEL_ALPHA  -- 
   The secondary alpha multiplier "M2" comes from the source pixels alpha component.
   Not valid if the source pixel format does not    include an alpha component.
  
 
- Pg_LAYER_ALPHA_M2_DST_PIXEL_ALPHA  -- 
   The secondary alpha multiplier "M2" comes from the destination pixels alpha component
   Not valid if the destination pixel format does not include an alpha component.
  
 
- Pg_LAYER_ALPHA_M2_GLOBAL  -- 
   The secondary alpha multiplier "M2" comes from global multiplier 2.
  
 
- Pg_LAYER_BLEND_SRC_M1_ALPHA  -- 
  Specifies how Ms, the value that will be multiplied with the source pixel data to produce the resultant 
  image, is derived.  Ms = M1
  
 
- Pg_LAYER_BLEND_SRC_ONE_MINUS_M1_ALPHA -- 
  Specifies how Ms, the value that will be multiplied with the source pixel data to produce the resultant 
  image, is derived.  Ms = 1 - M1
  
 
- Pg_LAYER_BLEND_SRC_M2_ALPHA -- 
  Specifies how Ms, the value that will be multiplied with the source pixel data to produce the resultant 
  image, is derived.  Ms = M2
  
 
- Pg_LAYER_BLEND_SRC_ONE_MINUS_M2_ALPHA -- 
  Specifies how Ms, the value that will be multiplied with the source pixel data to produce the resultant 
  image, is derived.  Ms =  1 - M2
  
 
- Pg_LAYER_BLEND_DEST_M1_ALPHA -- 
  Specifies how Md, the value that will be multiplied with the destination pixel data to produce the resultant 
  image, is derived.  Md = M1
  
 
- Pg_LAYER_BLEND_DEST_ONE_MINUS_M1_ALPHA -- 
  Specifies how Md, the value that will be multiplied with the destination pixel data to produce the resultant 
  image, is derived.  Md = 1 - M1
  
 
- Pg_LAYER_BLEND_DEST_M2_ALPHA -- 
  Specifies how Md, the value that will be multiplied with the destination pixel data to produce the resultant 
  image, is derived.  Md = M2
  
 
- Pg_LAYER_BLEND_DEST_ONE_MINUS_M2_ALPHA -- 
  Specifies how Md, the value that will be multiplied with the destination pixel data to produce the resultant 
  image, is derived.  Md = 1 - M2
  
 
 
- alpha_combine_caps
 
- Alpha combine capabilities.
  
- Pg_LAYER_ALPHA_COMBINE_CAP_SPP_WITH_DG  --  
    source per-pixel alpha blending with destination global alpha multiplier supported. 
  
 
- Pg_LAYER_ALPHA_COMBINE_CAP_SG_WITH_DPP  --  
    destination per-pixel alpha blending with source global alpha multiplier supported.
  
 
- Pg_LAYER_ALPHA_COMBINE_CAP_SPP_WITH_DPP  --  
    source per-pixel with alpha blending with destination per-pixel alpha blending supported.
  
 
 
- chroma_caps
 
- Chroma key capabilities:
  
- Pg_LAYER_CHROMAKEY_CAP_SRC_SINGLE  -- 
    Chroma-keying based on an exact match between the source pixel value, and a single key color, is supported.
  
 
- Pg_LAYER_CHROMAKEY_CAP_DST_SINGLE  -- 
        Chroma-keying based on an exact match between the destination pixel value, and a single key color, is supported.  
  
 
- Pg_LAYER_CHROMAKEY_CAP_SHOWTHROUGH  -- 
    Indicates that the layer can be configured so that when a chroma-key comparison is made,
   and the colors match, the displayed pixel will come from the layer(s) behind. 
   If the colors do not match, the displayed pixel will come from this layer.
  
 
- Pg_LAYER_CHROMAKEY_CAP_BLOCK  -- 
    Indicates that the layer can be configured so that when a chroma-key comparison is made,
    and the colors match, the displayed pixel will come from this layer. 
    If the colors do not match, the pixel will come from the layer(s) behind.
  
 
 
- max_data_width, max_data_height
 
- The maximum size of a layer surface, in pixels.
 
- max_src_width, max_src_height
 
- The maximum size of the source viewport, in pixels.
 
- max_dst_width, max_dst_height
 
- The maximum size of the destination viewport, in pixels.
 
- min_dst_width, min_dst_height
 
- The minimum size of the destination viewport, in pixels.
 
- max_x_scale
 
- The maximum scaling factor for scaling up in the horizontal direction:
  
- 1  --  you can't scale up.
  
 
- > 1  --  the width of the destination viewport can be up to
    max_x_scale times the width of the source viewport.
  
 
    Values less than 1 are invalid.
 
- max_y_scale
 
- The maximum scaling factor for scaling up in the vertical direction:
  
- 1  --  you can't scale up.
  
 
- > 1  --  the height of the destination viewport can be up to
    max_y_scale times the height of the source viewport.
  
 
    Values less than 1 are invalid.
 
- min_x_scale
 
- The maximum scaling factor for scaling down in the horizontal direction:
  
- 1  --  you can't scale down.
  
 
- > 1  --  the width of the source viewport can be up to
    min_x_scale times the width of the destination viewport.
  
 
    Values less than 1 are invalid.
 
- min_y_scale
 
- The maximum scaling factor for scaling down in the vertical direction:
  
- 1  --  you can't scale down.
  
 
- > 1  --  the height of the source viewport can be up to
    min_y_scale times the height of the destination viewport.
  
 
    Values less than 1 are invalid.
 
Photon
PgGetLayerCaps(),
PgSetLayerArg(),
PhImage_t
"Layers"
in the Raw Drawing and Animation chapter of the
Photon Programmer's Guide