Arm-2D  
2D Image Processing Library for Cortex-M Processors
3 Drawing Operations

Data Structures

struct  arm_2d_op_fill_cl_t
 the control block for colour-filling-operations More...
 
struct  arm_2d_op_drw_patn_t
 the control block for draw-bit-pattern operations More...
 
struct  arm_2d_op_fill_cl_t.Target
 
union  arm_2d_op_fill_cl_t.__unnamed86__
 
struct  arm_2d_op_drw_patn_t.Target
 
struct  arm_2d_op_drw_patn_t.Source
 
union  arm_2d_op_drw_patn_t.Foreground
 
union  arm_2d_op_drw_patn_t.Background
 

Macros

#define arm_2d_c8bit_draw_point(__TARGET_ADDR, __LOCATION, __COLOUR)
 
#define arm_2d_rgb16_draw_point(__TARGET_ADDR, __LOCATION, __COLOUR)
 
#define arm_2d_rgb32_draw_point(__TARGET_ADDR, __LOCATION, __COLOUR)
 
#define arm_2d_c8bit_draw_pattern( __PATTERN_ADDR, __TARGET_ADDR, __REGION_ADDR, __MODE, __FG_COLOUR, __BG_COLOUR)
 
#define arm_2d_rgb16_draw_pattern( __PATTERN_ADDR, __TARGET_ADDR, __REGION_ADDR, __MODE, __FG_COLOUR, __BG_COLOUR)
 
#define arm_2d_rgb32_draw_pattern( __PATTERN_ADDR, __TARGET_ADDR, __REGION_ADDR, __MODE, __FG_COLOUR, __BG_COLOUR)
 
#define arm_2d_c8bit_fill_colour( __TARGET_ADDR, __REGION_ADDR, __COLOUR)
 
#define arm_2d_rgb16_fill_colour( __TARGET_ADDR, __REGION_ADDR, __COLOUR)
 
#define arm_2d_rgb32_fill_colour( __TARGET_ADDR, __REGION_ADDR, __COLOUR)
 

Typedefs

typedef arm_2d_op_fill_cl_t arm_2d_op_drw_pt_t
 

Enumerations

enum  {
  ARM_2D_DRW_PATN_MODE_COPY = 0 ,
  ARM_2D_DRW_PATN_MODE_WITH_BG_COLOR = _BV(4) ,
  ARM_2D_DRW_PATN_MODE_NO_FG_COLOR = _BV(5) ,
  ARM_2D_DRW_PATH_MODE_COMP_FG_COLOUR = _BV(6)
}
 modes for copying bit-patterns More...
 

Functions

__STATIC_INLINE void arm_2d_c8bit_draw_point_fast (const arm_2d_tile_t *ptTarget, const arm_2d_location_t tLocation, uint_fast8_t chColour)
 draw a point on a root tile with a given 8bit colour More...
 
__STATIC_INLINE void arm_2d_rgb16_draw_point_fast (const arm_2d_tile_t *ptTarget, const arm_2d_location_t tLocation, uint_fast16_t hwColour)
 draw a point on a root tile with a given 16bit colour More...
 
__STATIC_INLINE void arm_2d_rgb32_draw_point_fast (const arm_2d_tile_t *ptTarget, const arm_2d_location_t tLocation, uint32_t wColour)
 draw a point on a root tile with a given 32bit colour More...
 
arm_fsm_rt_t arm_2dp_c8bit_draw_point (arm_2d_op_drw_pt_t *ptOP, const arm_2d_tile_t *ptTarget, const arm_2d_location_t tLocation, uint_fast8_t chColour)
 draw a point with a given 8bit colour More...
 
arm_fsm_rt_t arm_2dp_rgb16_draw_point (arm_2d_op_drw_pt_t *ptOP, const arm_2d_tile_t *ptTarget, const arm_2d_location_t tLocation, uint_fast16_t hwColour)
 draw a point with a given 16bit colour More...
 
arm_fsm_rt_t arm_2dp_rgb32_draw_point (arm_2d_op_drw_pt_t *ptOP, const arm_2d_tile_t *ptTarget, const arm_2d_location_t tLocation, uint32_t wColour)
 draw a point with a given 32bit colour More...
 
arm_fsm_rt_t arm_2dp_c8bit_draw_pattern (arm_2d_op_drw_patn_t *ptOP, const arm_2d_tile_t *ptPattern, const arm_2d_tile_t *ptTarget, const arm_2d_region_t *ptRegion, uint32_t wMode, uint8_t chForeColour, uint8_t chBackColour)
 copy a bit-pattern with given 8bit colours More...
 
arm_fsm_rt_t arm_2dp_rgb16_draw_pattern (arm_2d_op_drw_patn_t *ptOP, const arm_2d_tile_t *ptPattern, const arm_2d_tile_t *ptTarget, const arm_2d_region_t *ptRegion, uint32_t wMode, uint16_t hwForeColour, uint16_t hwBackColour)
 copy a bit-pattern with given 16bit colours More...
 
arm_fsm_rt_t arm_2dp_rgb32_draw_pattern (arm_2d_op_drw_patn_t *ptOP, const arm_2d_tile_t *ptPattern, const arm_2d_tile_t *ptTarget, const arm_2d_region_t *ptRegion, uint32_t wMode, uint32_t wForeColour, uint32_t wBackColour)
 copy a bit-pattern with given 32bit colours More...
 
arm_fsm_rt_t arm_2dp_c8bit_fill_colour (arm_2d_op_fill_cl_t *ptOP, const arm_2d_tile_t *ptTarget, const arm_2d_region_t *ptRegion, uint_fast8_t chColour)
 fill the target region with a given 8bit colour More...
 
arm_fsm_rt_t arm_2dp_rgb16_fill_colour (arm_2d_op_fill_cl_t *ptOP, const arm_2d_tile_t *ptTarget, const arm_2d_region_t *ptRegion, uint_fast16_t hwColour)
 fill the target region with a given 16bit colour More...
 
arm_fsm_rt_t arm_2dp_rgb32_fill_colour (arm_2d_op_fill_cl_t *ptOP, const arm_2d_tile_t *ptTarget, const arm_2d_region_t *ptRegion, uint32_t wColour)
 fill the target region with a given 32bit colour More...
 

Description


Data Structure Documentation

◆ arm_2d_op_fill_cl_t

struct arm_2d_op_fill_cl_t

the control block for colour-filling-operations

Note
arm_2d_op_fill_cl_t inherits from arm_2d_op_t explicitly

Public Member Functions

 inherit (arm_2d_op_core_t)
 base More...
 

Data Fields

struct {
const arm_2d_tile_tptTile
 target tile More...
 
const arm_2d_region_tptRegion
 target region More...
 
Target
 
union {
uint8_t chColour
 8bit colour More...
 
uint16_t hwColour
 16bit colour More...
 
uint32_t wColour
 32bit colour More...
 
}; 
 

Member Function Documentation

◆ inherit()

arm_2d_op_fill_cl_t::inherit ( arm_2d_op_core_t  )

base

◆ arm_2d_op_drw_patn_t

struct arm_2d_op_drw_patn_t

the control block for draw-bit-pattern operations

Note
arm_2d_op_drw_patn_t inherits from arm_2d_op_src_t explicitly

Public Member Functions

 inherit (arm_2d_op_core_t)
 base More...
 

Data Fields

struct {
const arm_2d_tile_tptTile
 target tile More...
 
const arm_2d_region_tptRegion
 target region More...
 
Target
 
struct {
const arm_2d_tile_tptTile
 source tile More...
 
Source
 
uint32_t wMode
 mode of the operation More...
 
union {
uint8_t chColour
 8bit colour More...
 
uint16_t hwColour
 16bit colour More...
 
uint32_t wColour
 32bit colour More...
 
Foreground
 forground colour More...
 
union {
uint8_t chColour
 8bit colour More...
 
uint16_t hwColour
 16bit colour More...
 
uint32_t wColour
 32bit colour More...
 
Background
 background colour More...
 

Member Function Documentation

◆ inherit()

arm_2d_op_drw_patn_t::inherit ( arm_2d_op_core_t  )

base

Field Documentation

◆ wMode

uint32_t arm_2d_op_drw_patn_t::wMode

mode of the operation

◆ 

union { ... } arm_2d_op_drw_patn_t::Foreground

forground colour

◆ 

union { ... } arm_2d_op_drw_patn_t::Background

background colour

◆ arm_2d_op_fill_cl_t.Target

struct arm_2d_op_fill_cl_t.Target
Data Fields
const arm_2d_tile_t * ptTile target tile
const arm_2d_region_t * ptRegion target region

◆ arm_2d_op_fill_cl_t.__unnamed86__

union arm_2d_op_fill_cl_t.__unnamed86__
Data Fields
uint8_t chColour 8bit colour
uint16_t hwColour 16bit colour
uint32_t wColour 32bit colour

◆ arm_2d_op_drw_patn_t.Target

struct arm_2d_op_drw_patn_t.Target
Data Fields
const arm_2d_tile_t * ptTile target tile
const arm_2d_region_t * ptRegion target region

◆ arm_2d_op_drw_patn_t.Source

struct arm_2d_op_drw_patn_t.Source
Data Fields
const arm_2d_tile_t * ptTile source tile

◆ arm_2d_op_drw_patn_t.Foreground

union arm_2d_op_drw_patn_t.Foreground
Data Fields
uint8_t chColour 8bit colour
uint16_t hwColour 16bit colour
uint32_t wColour 32bit colour

◆ arm_2d_op_drw_patn_t.Background

union arm_2d_op_drw_patn_t.Background
Data Fields
uint8_t chColour 8bit colour
uint16_t hwColour 16bit colour
uint32_t wColour 32bit colour

Macro Definition Documentation

◆ arm_2d_c8bit_draw_point

#define arm_2d_c8bit_draw_point (   __TARGET_ADDR,
  __LOCATION,
  __COLOUR 
)
Value:
/* target colour */ \
arm_2dp_c8bit_draw_point(NULL, \
(__TARGET_ADDR), \
(__LOCATION), \
(__COLOUR))

◆ arm_2d_rgb16_draw_point

#define arm_2d_rgb16_draw_point (   __TARGET_ADDR,
  __LOCATION,
  __COLOUR 
)
Value:
/* target colour */ \
arm_2dp_rgb16_draw_point(NULL, \
(__TARGET_ADDR), \
(__LOCATION), \
(__COLOUR))

◆ arm_2d_rgb32_draw_point

#define arm_2d_rgb32_draw_point (   __TARGET_ADDR,
  __LOCATION,
  __COLOUR 
)
Value:
/* target colour */ \
arm_2dp_rgb32_draw_point(NULL, \
(__TARGET_ADDR), \
(__LOCATION), \
(__COLOUR))

◆ arm_2d_c8bit_draw_pattern

#define arm_2d_c8bit_draw_pattern (   __PATTERN_ADDR,
  __TARGET_ADDR,
  __REGION_ADDR,
  __MODE,
  __FG_COLOUR,
  __BG_COLOUR 
)
Value:
/* background colour */ \
arm_2dp_c8bit_draw_pattern(NULL, \
(__PATTERN_ADDR), \
(__TARGET_ADDR), \
(__REGION_ADDR), \
(__MODE), \
(__FG_COLOUR), \
(__BG_COLOUR))

◆ arm_2d_rgb16_draw_pattern

#define arm_2d_rgb16_draw_pattern (   __PATTERN_ADDR,
  __TARGET_ADDR,
  __REGION_ADDR,
  __MODE,
  __FG_COLOUR,
  __BG_COLOUR 
)
Value:
/* background colour */ \
arm_2dp_rgb16_draw_pattern(NULL, \
(__PATTERN_ADDR), \
(__TARGET_ADDR), \
(__REGION_ADDR), \
(__MODE), \
(__FG_COLOUR), \
(__BG_COLOUR))

◆ arm_2d_rgb32_draw_pattern

#define arm_2d_rgb32_draw_pattern (   __PATTERN_ADDR,
  __TARGET_ADDR,
  __REGION_ADDR,
  __MODE,
  __FG_COLOUR,
  __BG_COLOUR 
)
Value:
/* background colour */ \
arm_2dp_rgb32_draw_pattern(NULL, \
(__PATTERN_ADDR), \
(__TARGET_ADDR), \
(__REGION_ADDR), \
(__MODE), \
(__FG_COLOUR), \
(__BG_COLOUR))

◆ arm_2d_c8bit_fill_colour

#define arm_2d_c8bit_fill_colour (   __TARGET_ADDR,
  __REGION_ADDR,
  __COLOUR 
)
Value:
/* colour */ \
arm_2dp_c8bit_fill_colour(NULL, \
(__TARGET_ADDR), \
(__REGION_ADDR), \
(__COLOUR))

◆ arm_2d_rgb16_fill_colour

#define arm_2d_rgb16_fill_colour (   __TARGET_ADDR,
  __REGION_ADDR,
  __COLOUR 
)
Value:
/* colour */ \
arm_2dp_rgb16_fill_colour(NULL, \
(__TARGET_ADDR), \
(__REGION_ADDR), \
(__COLOUR))

◆ arm_2d_rgb32_fill_colour

#define arm_2d_rgb32_fill_colour (   __TARGET_ADDR,
  __REGION_ADDR,
  __COLOUR 
)
Value:
/* colour */ \
arm_2dp_rgb32_fill_colour(NULL, \
(__TARGET_ADDR), \
(__REGION_ADDR), \
(__COLOUR))

Typedef Documentation

◆ arm_2d_op_drw_pt_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

modes for copying bit-patterns

Enumerator
ARM_2D_DRW_PATN_MODE_COPY 

copy bit pattern

ARM_2D_DRW_PATN_MODE_WITH_BG_COLOR 

use user specified backgound colour

ARM_2D_DRW_PATN_MODE_NO_FG_COLOR 

no forground

ARM_2D_DRW_PATH_MODE_COMP_FG_COLOUR 

use complementary colour as foreground colour

\note this option is only avaialble when ARM_2D_DRW_PATN_MODE_NO_FG_COLOR
      is used together.

Function Documentation

◆ arm_2d_c8bit_draw_point_fast()

__STATIC_INLINE void arm_2d_c8bit_draw_point_fast ( const arm_2d_tile_t ptTarget,
const arm_2d_location_t  tLocation,
uint_fast8_t  chColour 
)

draw a point on a root tile with a given 8bit colour

Parameters
[in]ptTargetthe target root tile
[in]tLocationthe target location
Note
the point must be inside the region of the target tile
Parameters
[in]chColouran 8bit colour

◆ arm_2d_rgb16_draw_point_fast()

__STATIC_INLINE void arm_2d_rgb16_draw_point_fast ( const arm_2d_tile_t ptTarget,
const arm_2d_location_t  tLocation,
uint_fast16_t  hwColour 
)

draw a point on a root tile with a given 16bit colour

Parameters
[in]ptTargetthe target root tile
[in]tLocationthe target location
Note
the point must be inside the region of the target tile
Parameters
[in]hwColouran 16bit colour

◆ arm_2d_rgb32_draw_point_fast()

__STATIC_INLINE void arm_2d_rgb32_draw_point_fast ( const arm_2d_tile_t ptTarget,
const arm_2d_location_t  tLocation,
uint32_t  wColour 
)

draw a point on a root tile with a given 32bit colour

Parameters
[in]ptTargetthe target root tile
[in]tLocationthe target location
Note
the point must be inside the region of the target tile
Parameters
[in]wColouran 32bit colour

◆ arm_2dp_c8bit_draw_point()

arm_fsm_rt_t arm_2dp_c8bit_draw_point ( arm_2d_op_drw_pt_t ptOP,
const arm_2d_tile_t ptTarget,
const arm_2d_location_t  tLocation,
uint_fast8_t  chColour 
)

draw a point with a given 8bit colour

Parameters
[in]ptOPthe control block, NULL means using the default control block
[in]ptTargetthe target root tile
[in]tLocationthe target location
[in]chColouran 8bit colour
Returns
arm_fsm_rt_t the operation result
Note
As those draw point APIs involve the region calculation which is only useful when partial framebuffer is used, it is slow. For gettting better performance, if the target tile is root and the target location is inside the target region, please use the functions with "_fast" posfix.

◆ arm_2dp_rgb16_draw_point()

arm_fsm_rt_t arm_2dp_rgb16_draw_point ( arm_2d_op_drw_pt_t ptOP,
const arm_2d_tile_t ptTarget,
const arm_2d_location_t  tLocation,
uint_fast16_t  hwColour 
)

draw a point with a given 16bit colour

Parameters
[in]ptOPthe control block, NULL means using the default control block
[in]ptTargetthe target root tile
[in]tLocationthe target location
[in]hwColouran 16bit colour
Returns
arm_fsm_rt_t the operation result
Note
As those draw point APIs involve the region calculation which is only useful when partial framebuffer is used, it is slow. For gettting better performance, if the target tile is root and the target location is inside the target region, please use the functions with "_fast" posfix.

◆ arm_2dp_rgb32_draw_point()

arm_fsm_rt_t arm_2dp_rgb32_draw_point ( arm_2d_op_drw_pt_t ptOP,
const arm_2d_tile_t ptTarget,
const arm_2d_location_t  tLocation,
uint32_t  wColour 
)

draw a point with a given 32bit colour

Parameters
[in]ptOPthe control block, NULL means using the default control block
[in]ptTargetthe target root tile
[in]tLocationthe target location
[in]wColouran 32bit colour
Returns
arm_fsm_rt_t the operation result
Note
As those draw point APIs involve the region calculation which is only useful when partial framebuffer is used, it is slow. For gettting better performance, if the target tile is root and the target location is inside the target region, please use the functions with "_fast" posfix.

◆ arm_2dp_c8bit_draw_pattern()

arm_fsm_rt_t arm_2dp_c8bit_draw_pattern ( arm_2d_op_drw_patn_t ptOP,
const arm_2d_tile_t ptPattern,
const arm_2d_tile_t ptTarget,
const arm_2d_region_t ptRegion,
uint32_t  wMode,
uint8_t  chForeColour,
uint8_t  chBackColour 
)

copy a bit-pattern with given 8bit colours

Parameters
[in]ptOPthe control block, NULL means using the default control block
[in]ptPatternthe source bit pattern
[in]ptTargetthe target tile
[in]ptRegionthe target region
[in]wModethe copy mode
[in]chForeColourthe foreground colour
[in]chBackColourthe background colour
Returns
arm_fsm_rt_t the operation result

◆ arm_2dp_rgb16_draw_pattern()

arm_fsm_rt_t arm_2dp_rgb16_draw_pattern ( arm_2d_op_drw_patn_t ptOP,
const arm_2d_tile_t ptPattern,
const arm_2d_tile_t ptTarget,
const arm_2d_region_t ptRegion,
uint32_t  wMode,
uint16_t  hwForeColour,
uint16_t  hwBackColour 
)

copy a bit-pattern with given 16bit colours

Parameters
[in]ptOPthe control block, NULL means using the default control block
[in]ptPatternthe source bit pattern
[in]ptTargetthe target tile
[in]ptRegionthe target region
[in]wModethe copy mode
[in]hwForeColourthe foreground colour
[in]hwBackColourthe background colour
Returns
arm_fsm_rt_t the operation result

◆ arm_2dp_rgb32_draw_pattern()

arm_fsm_rt_t arm_2dp_rgb32_draw_pattern ( arm_2d_op_drw_patn_t ptOP,
const arm_2d_tile_t ptPattern,
const arm_2d_tile_t ptTarget,
const arm_2d_region_t ptRegion,
uint32_t  wMode,
uint32_t  wForeColour,
uint32_t  wBackColour 
)

copy a bit-pattern with given 32bit colours

Parameters
[in]ptOPthe control block, NULL means using the default control block
[in]ptPatternthe source bit pattern
[in]ptTargetthe target tile
[in]ptRegionthe target region
[in]wModethe copy mode
[in]wForeColourthe foreground colour
[in]wBackColourthe background colour
Returns
arm_fsm_rt_t the operation result

◆ arm_2dp_c8bit_fill_colour()

arm_fsm_rt_t arm_2dp_c8bit_fill_colour ( arm_2d_op_fill_cl_t ptOP,
const arm_2d_tile_t ptTarget,
const arm_2d_region_t ptRegion,
uint_fast8_t  chColour 
)

fill the target region with a given 8bit colour

Parameters
[in]ptOPthe control block, NULL means using the default control block
[in]ptTargetthe target tile
[in]ptRegionthe target region
[in]chColoura 8bit colour
Returns
arm_fsm_rt_t the operation result

◆ arm_2dp_rgb16_fill_colour()

arm_fsm_rt_t arm_2dp_rgb16_fill_colour ( arm_2d_op_fill_cl_t ptOP,
const arm_2d_tile_t ptTarget,
const arm_2d_region_t ptRegion,
uint_fast16_t  hwColour 
)

fill the target region with a given 16bit colour

Parameters
[in]ptOPthe control block, NULL means using the default control block
[in]ptTargetthe target tile
[in]ptRegionthe target region
[in]hwColoura 16bit colour
Returns
arm_fsm_rt_t the operation result

◆ arm_2dp_rgb32_fill_colour()

arm_fsm_rt_t arm_2dp_rgb32_fill_colour ( arm_2d_op_fill_cl_t ptOP,
const arm_2d_tile_t ptTarget,
const arm_2d_region_t ptRegion,
uint32_t  wColour 
)

fill the target region with a given 32bit colour

Parameters
[in]ptOPthe control block, NULL means using the default control block
[in]ptTargetthe target tile
[in]ptRegionthe target region
[in]wColoura 32bit colour
Returns
arm_fsm_rt_t the operations result