All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
InverterLayer

Detailed Description

Layer that inverts anything "below it".

inverter_layer.png

This layer takes what has been drawn into the graphics context by layers that are "behind" it in the layer hierarchy. Then, the inverter layer uses its geometric information (bounds, frame) as the area to invert in the graphics context. Inverting will cause black pixels to become white and vice versa.

The InverterLayer is useful, for example, to highlight the selected item in a menu. In fact, the MenuLayer itself uses InverterLayer to accomplish its selection highlighting.

Function Documentation

InverterLayer* inverter_layer_create ( GRect  frame)

Creates a new InverterLayer on the heap and initializes it with the default values.

  • Clips: true
  • Hidden: false
    Returns
    A pointer to the InverterLayer. NULL if the InverterLayer could not be created
void inverter_layer_destroy ( InverterLayer *  inverter_layer)

Destroys an InverterLayer previously created by inverter_layer_create.

Layer* inverter_layer_get_layer ( InverterLayer *  inverter_layer)

Gets the "root" Layer of the inverter layer, which is the parent for the sub- layers used for its implementation.

Parameters
inverter_layerPointer to the InverterLayer for which to get the "root" Layer
Returns
The "root" Layer of the inverter layer.