FreeBASIC  0.91.0
gfx_line.c File Reference
#include "fb_gfx.h"
Include dependency graph for gfx_line.c:

Go to the source code of this file.

Macros

#define CLIP_LEFT_EDGE   0x1
 
#define CLIP_RIGHT_EDGE   0x2
 
#define CLIP_BOTTOM_EDGE   0x4
 
#define CLIP_TOP_EDGE   0x8
 
#define CLIP_INSIDE(a)   (!a)
 
#define CLIP_REJECT(a, b)   ((a) & (b))
 
#define CLIP_ACCEPT(a, b)   (!((a) | (b)))
 

Functions

static int encode (FB_GFXCTX *context, int x, int y)
 
static int reverse_mask (int mask)
 
static int clip_line (FB_GFXCTX *context, int *x1, int *y1, int *x2, int *y2)
 
FBCALL void fb_GfxLine (void *target, float fx1, float fy1, float fx2, float fy2, unsigned int color, int type, unsigned int style, int flags)
 

Macro Definition Documentation

#define CLIP_ACCEPT (   a,
 
)    (!((a) | (b)))

Definition at line 12 of file gfx_line.c.

#define CLIP_BOTTOM_EDGE   0x4

Definition at line 8 of file gfx_line.c.

#define CLIP_INSIDE (   a)    (!a)

Definition at line 10 of file gfx_line.c.

#define CLIP_LEFT_EDGE   0x1

Definition at line 6 of file gfx_line.c.

#define CLIP_REJECT (   a,
 
)    ((a) & (b))

Definition at line 11 of file gfx_line.c.

#define CLIP_RIGHT_EDGE   0x2

Definition at line 7 of file gfx_line.c.

#define CLIP_TOP_EDGE   0x8

Definition at line 9 of file gfx_line.c.

Function Documentation

static int clip_line ( FB_GFXCTX context,
int *  x1,
int *  y1,
int *  x2,
int *  y2 
)
static

Definition at line 45 of file gfx_line.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static int encode ( FB_GFXCTX context,
int  x,
int  y 
)
static

Definition at line 16 of file gfx_line.c.

Here is the caller graph for this function:

FBCALL void fb_GfxLine ( void *  target,
float  fx1,
float  fy1,
float  fx2,
float  fy2,
unsigned int  color,
int  type,
unsigned int  style,
int  flags 
)

Definition at line 92 of file gfx_line.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static int reverse_mask ( int  mask)
static

Definition at line 33 of file gfx_line.c.

Here is the caller graph for this function: