Back to index

lightning-sunbird  0.9+nobinonly
Functions
cairo-slope.c File Reference
#include "cairoint.h"

Go to the source code of this file.

Functions

void _cairo_slope_init (cairo_slope_t *slope, cairo_point_t *a, cairo_point_t *b)
int _cairo_slope_compare (cairo_slope_t *a, cairo_slope_t *b)
int _cairo_slope_clockwise (cairo_slope_t *a, cairo_slope_t *b)
int _cairo_slope_counter_clockwise (cairo_slope_t *a, cairo_slope_t *b)

Function Documentation

Definition at line 90 of file cairo-slope.c.

{
    return _cairo_slope_compare (a, b) < 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 58 of file cairo-slope.c.

{
    cairo_fixed_48_16_t diff;

    diff = ((cairo_fixed_48_16_t) a->dy * (cairo_fixed_48_16_t) b->dx 
           - (cairo_fixed_48_16_t) b->dy * (cairo_fixed_48_16_t) a->dx);

    if (diff > 0)
       return 1;
    if (diff < 0)
       return -1;

    if (a->dx == 0 && a->dy == 0)
       return 1;
    if (b->dx == 0 && b->dy ==0)
       return -1;

    return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 96 of file cairo-slope.c.

{
    return ! _cairo_slope_clockwise (a, b);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 40 of file cairo-slope.c.

{
    slope->dx = b->x - a->x;
    slope->dy = b->y - a->y;
}

Here is the caller graph for this function: