Arm-2D  
2D Image Processing Library for Cortex-M Processors
 
Loading...
Searching...
No Matches
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_pt_t
 the control block for drawing point 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.__unnamed92__
 
struct  arm_2d_op_drw_pt_t.Target
 
union  arm_2d_op_drw_pt_t.__unnamed95__
 
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_2dp_c8bit_draw_point   arm_2dp_gray8_draw_point
 
#define arm_2dp_rgb16_draw_point   arm_2dp_rgb565_draw_point
 
#define arm_2dp_rgb32_draw_point   arm_2dp_cccn888_draw_point
 
#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_gray8_draw_point(__TARGET_ADDR, __LOCATION, __COLOUR, ...)
 
#define arm_2d_rgb565_draw_point(__TARGET_ADDR, __LOCATION, __COLOUR, ...)
 
#define arm_2d_cccn888_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)
 

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_gray8_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, uint8_t chOpacity)
 draw a point with a given gray8 colour More...
 
arm_fsm_rt_t arm_2dp_rgb565_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, uint8_t chOpacity)
 draw a point with a given rgb565 colour More...
 
arm_fsm_rt_t arm_2dp_cccn888_draw_point (arm_2d_op_drw_pt_t *ptOP, const arm_2d_tile_t *ptTarget, const arm_2d_location_t tLocation, uint32_t wColour, uint8_t chOpacity)
 draw a point with a given cccn888 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
Data Fields
arm_2d_op_core_t base
struct arm_2d_op_fill_cl_t.Target Target
union arm_2d_op_fill_cl_t.__unnamed92__ __unnamed__

◆ arm_2d_op_drw_pt_t

struct arm_2d_op_drw_pt_t

the control block for drawing point

Note
arm_2d_op_drw_pt_t inherits from arm_2d_op_t explicitly
Data Fields
arm_2d_op_core_t base
struct arm_2d_op_drw_pt_t.Target Target
union arm_2d_op_drw_pt_t.__unnamed95__ __unnamed__
uint8_t chOpaicty
arm_2d_region_t tTargetRegion

◆ 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
Data Fields
arm_2d_op_core_t base
struct arm_2d_op_drw_patn_t.Target Target
struct arm_2d_op_drw_patn_t.Source Source
uint32_t wMode mode of the operation
union arm_2d_op_drw_patn_t.Foreground Foreground forground colour
union arm_2d_op_drw_patn_t.Background 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.__unnamed92__

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

◆ arm_2d_op_drw_pt_t.Target

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

◆ arm_2d_op_drw_pt_t.__unnamed95__

union arm_2d_op_drw_pt_t.__unnamed95__
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_gray8_draw_point(NULL, \
(__TARGET_ADDR), \
(__LOCATION), \
(__COLOUR), \
(255))

◆ arm_2d_rgb16_draw_point

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

◆ arm_2d_rgb32_draw_point

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

◆ arm_2d_gray8_draw_point

#define arm_2d_gray8_draw_point (   __TARGET_ADDR,
  __LOCATION,
  __COLOUR,
  ... 
)
Value:
(__TARGET_ADDR), \
(__LOCATION), \
(__COLOUR), \
(255,##__VA_ARGS__))

◆ arm_2d_rgb565_draw_point

#define arm_2d_rgb565_draw_point (   __TARGET_ADDR,
  __LOCATION,
  __COLOUR,
  ... 
)
Value:
(__TARGET_ADDR), \
(__LOCATION), \
(__COLOUR), \
(255,##__VA_ARGS__))

◆ arm_2d_cccn888_draw_point

#define arm_2d_cccn888_draw_point (   __TARGET_ADDR,
  __LOCATION,
  __COLOUR,
  ... 
)
Value:
(__TARGET_ADDR), \
(__LOCATION), \
(__COLOUR), \
(255,##__VA_ARGS__))

◆ 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))

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_gray8_draw_point()

arm_fsm_rt_t arm_2dp_gray8_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,
uint8_t  chOpacity 
)

draw a point with a given gray8 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
[in]chOpacitythe point opacity
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_rgb565_draw_point()

arm_fsm_rt_t arm_2dp_rgb565_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,
uint8_t  chOpacity 
)

draw a point with a given rgb565 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
[in]chOpacitythe point opacity
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_cccn888_draw_point()

arm_fsm_rt_t arm_2dp_cccn888_draw_point ( arm_2d_op_drw_pt_t ptOP,
const arm_2d_tile_t ptTarget,
const arm_2d_location_t  tLocation,
uint32_t  wColour,
uint8_t  chOpacity 
)

draw a point with a given cccn888 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
[in]chOpacitythe point opacity
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