draw.h File Reference

Go to the source code of this file.

Classes

struct  ASDrawTool
struct  ASDrawContext

Defines

#define ASDrawCTX_UsingScratch   (0x01<<0)
#define ASDrawCTX_CanvasIsARGB   (0x01<<1)
#define ASDrawCTX_ToolIsARGB   (0x01<<2)
#define AS_DRAW_BRUSHES   3

Functions

ASDrawContextcreate_asdraw_context (unsigned int width, unsigned int height)
Bool apply_asdraw_context (ASImage *im, ASDrawContext *ctx, ASFlagType filter)
void destroy_asdraw_context (ASDrawContext *ctx)
Bool asim_set_brush (ASDrawContext *ctx, int brush)
Bool asim_set_custom_brush (ASDrawContext *ctx, ASDrawTool *brush)
Bool asim_set_custom_brush_colored (ASDrawContext *ctx, ASDrawTool *brush)
Bool asim_start_path (ASDrawContext *ctx)
Bool asim_apply_path (ASDrawContext *ctx, int start_x, int start_y, Bool fill, int fill_start_x, int fill_start_y, CARD8 fill_threshold)
void asim_move_to (ASDrawContext *ctx, int dst_x, int dst_y)
void asim_line_to (ASDrawContext *ctx, int dst_x, int dst_y)
void asim_line_to_aa (ASDrawContext *ctx, int dst_x, int dst_y)
void asim_cube_bezier (ASDrawContext *ctx, int x1, int y1, int x2, int y2, int x3, int y3)
void asim_straight_ellips (ASDrawContext *ctx, int x, int y, int rx, int ry, Bool fill)
void asim_circle (ASDrawContext *ctx, int x, int y, int r, Bool fill)
void asim_ellips (ASDrawContext *ctx, int x, int y, int rx, int ry, int angle, Bool fill)
void asim_ellips2 (ASDrawContext *ctx, int x, int y, int rx, int ry, int angle, Bool fill)
void asim_rectangle (ASDrawContext *ctx, int x, int y, int width, int height)
void asim_flood_fill (ASDrawContext *ctx, int x, int y, CARD32 min_val, CARD32 max_val)


Define Documentation

#define AS_DRAW_BRUSHES   3

Definition at line 31 of file draw.h.

Referenced by asim_set_brush().

#define ASDrawCTX_CanvasIsARGB   (0x01<<1)

Definition at line 15 of file draw.h.

Referenced by asim_apply_path(), asim_cube_bezier(), and create_draw_context_argb32().

#define ASDrawCTX_ToolIsARGB   (0x01<<2)

Definition at line 16 of file draw.h.

Referenced by asim_set_brush(), asim_set_custom_brush(), and asim_set_custom_brush_colored().

#define ASDrawCTX_UsingScratch   (0x01<<0)

Definition at line 14 of file draw.h.

Referenced by apply_tool_2D_colored(), apply_tool_point_colored(), asim_apply_path(), asim_start_path(), and fill_hline_notile_colored().


Function Documentation

Bool apply_asdraw_context ( ASImage im,
ASDrawContext ctx,
ASFlagType  filter 
)

Definition at line 1046 of file draw.c.

References ASStorage_32Bit, ASStorage_RLEDiffCompress, ASDrawContext::canvas, ASDrawContext::canvas_height, ASDrawContext::canvas_width, ASImage::channels, False, forget_data(), fprintf(), get_flags, ASImage::height, height, i, IC_NUM_CHANNELS, LOCAL_DEBUG, NULL, store_data(), True, width, ASImage::width, x01, and y.

Bool asim_apply_path ( ASDrawContext ctx,
int  start_x,
int  start_y,
Bool  fill,
int  fill_start_x,
int  fill_start_y,
CARD8  fill_threshold 
)

Definition at line 1012 of file draw.c.

References alpha_blend_point_argb32(), argb, ASDrawCTX_CanvasIsARGB, ASDrawCTX_UsingScratch, asim_flood_fill(), clear_flags, CTX_DEFAULT_FILL_THRESHOLD, False, ASDrawContext::flags, get_flags, i, LOCAL_DEBUG_CALLER_OUT, NULL, and True.

Referenced by asim_cube_bezier(), asim_ellips(), and asim_straight_ellips().

void asim_circle ( ASDrawContext ctx,
int  x,
int  y,
int  r,
Bool  fill 
)

Definition at line 1384 of file draw.c.

References asim_straight_ellips().

Referenced by TASImage::DrawCircle().

void asim_cube_bezier ( ASDrawContext ctx,
int  x1,
int  y1,
int  x2,
int  y2,
int  x3,
int  y3 
)

Definition at line 1176 of file draw.c.

References ASDrawCTX_CanvasIsARGB, asim_apply_path(), asim_move_to(), asim_start_path(), ctx_draw_bezier(), ASDrawContext::curr_x, ASDrawContext::curr_y, False, ASDrawContext::flags, get_flags, and x0.

Referenced by TASImage::DrawCubeBezier().

void asim_ellips ( ASDrawContext ctx,
int  x,
int  y,
int  rx,
int  ry,
int  angle,
Bool  fill 
)

Definition at line 1391 of file draw.c.

References asim_apply_path(), asim_move_to(), asim_sin(), asim_start_path(), asim_straight_ellips(), ctx_draw_bezier(), CTX_ELLIPS_FILL_THRESHOLD, False, x0, and x3.

Referenced by TASImage::DrawEllips().

void asim_ellips2 ( ASDrawContext ctx,
int  x,
int  y,
int  rx,
int  ry,
int  angle,
Bool  fill 
)

Definition at line 1462 of file draw.c.

References A, asim_move_to(), asim_sin(), asim_sqrt(), asim_straight_ellips(), B, C, CTX_FILL_HLINE, CTX_PUT_PIXEL, d, double, Reflex::F, fprintf(), int, line, x1, and x2.

Referenced by TASImage::DrawEllips2().

void asim_flood_fill ( ASDrawContext ctx,
int  x,
int  y,
CARD32  min_val,
CARD32  max_val 
)

void asim_line_to ( ASDrawContext ctx,
int  dst_x,
int  dst_y 
)

Definition at line 1163 of file draw.c.

References asim_line_to_generic(), and ctx_draw_line_solid().

Referenced by TASImage::DrawWideLine().

void asim_line_to_aa ( ASDrawContext ctx,
int  dst_x,
int  dst_y 
)

Definition at line 1170 of file draw.c.

References asim_line_to_generic(), and ctx_draw_line_solid_aa().

void asim_move_to ( ASDrawContext ctx,
int  dst_x,
int  dst_y 
)

void asim_rectangle ( ASDrawContext ctx,
int  x,
int  y,
int  width,
int  height 
)

Definition at line 1746 of file draw.c.

References asim_line_to_generic(), asim_move_to(), and ctx_draw_line_solid().

Bool asim_set_brush ( ASDrawContext ctx,
int  brush 
)

Bool asim_set_custom_brush ( ASDrawContext ctx,
ASDrawTool brush 
)

Definition at line 952 of file draw.c.

References apply_tool_2D(), ASDrawContext::apply_tool_func, apply_tool_point(), ASDrawCTX_ToolIsARGB, clear_flags, False, ASDrawContext::fill_hline_func, fill_hline_notile(), ASDrawContext::flags, ASDrawTool::height, NULL, ASDrawContext::tool, True, and ASDrawTool::width.

Bool asim_set_custom_brush_colored ( ASDrawContext ctx,
ASDrawTool brush 
)

Definition at line 972 of file draw.c.

References apply_tool_2D_colored(), ASDrawContext::apply_tool_func, apply_tool_point_colored(), ASDrawCTX_ToolIsARGB, False, ASDrawContext::fill_hline_func, fill_hline_notile_colored(), ASDrawContext::flags, ASDrawTool::height, NULL, set_flags, ASDrawContext::tool, True, and ASDrawTool::width.

Referenced by create_draw_context_argb32().

Bool asim_start_path ( ASDrawContext ctx  ) 

Definition at line 992 of file draw.c.

References ASDrawCTX_UsingScratch, ASDrawContext::canvas_height, ASDrawContext::canvas_width, False, ASDrawContext::flags, get_flags, LOCAL_DEBUG_OUT, NULL, safecalloc, ASDrawContext::scratch_canvas, set_flags, and True.

Referenced by asim_cube_bezier(), asim_ellips(), and asim_straight_ellips().

void asim_straight_ellips ( ASDrawContext ctx,
int  x,
int  y,
int  rx,
int  ry,
Bool  fill 
)

Definition at line 1263 of file draw.c.

References asim_apply_path(), asim_move_to(), asim_start_path(), ASDrawContext::canvas_height, ctx_draw_bezier(), CTX_ELLIPS_FILL_THRESHOLD, CTX_FILL_HLINE, d, LOCAL_DEBUG_OUT, long, Long64_t, max, render_supersampled_pixel(), and x1.

Referenced by asim_circle(), asim_ellips(), asim_ellips2(), and TASImage::DrawStraightEllips().

ASDrawContext* create_asdraw_context ( unsigned int  width,
unsigned int  height 
)

Definition at line 904 of file draw.c.

References asim_set_brush(), ASDrawContext::canvas, ASDrawContext::canvas_height, ASDrawContext::canvas_width, ASDrawContext::fill_hline_func, fill_hline_notile(), and safecalloc.

void destroy_asdraw_context ( ASDrawContext ctx  ) 

Definition at line 919 of file draw.c.

References ASDrawContext::canvas, free(), and ASDrawContext::scratch_canvas.


Generated on Tue Jul 5 15:57:54 2011 for ROOT_528-00b_version by  doxygen 1.5.1