gschem
|
#include <config.h>
#include <stdio.h>
#include <math.h>
#include <cairo.h>
#include "gschem.h"
Go to the source code of this file.
Defines | |
#define | NUM_BEZIER_SEGMENTS 100 |
Typedefs | |
typedef void(* | FILL_FUNC )(GSCHEM_TOPLEVEL *w_current, COLOR *color, PATH *path, gint fill_width, gint angle1, gint pitch1, gint angle2, gint pitch2) |
Functions | |
static void | hint_coordinates (int x, int y, double *fx, double *fy, int width) |
static void | path_path (GSCHEM_TOPLEVEL *w_current, OBJECT *object) |
static PATH * | path_copy_modify (PATH *path, int dx, int dy, int new_x, int new_y, int whichone) |
static void | o_path_fill_hollow (GSCHEM_TOPLEVEL *w_current, COLOR *color, PATH *path, gint fill_width, gint angle1, gint pitch1, gint angle2, gint pitch2) |
Placeholder filling function. | |
static void | o_path_fill_fill (GSCHEM_TOPLEVEL *w_current, COLOR *color, PATH *path, gint fill_width, gint angle1, gint pitch1, gint angle2, gint pitch2) |
Fill inside of path with a solid pattern. | |
static void | o_path_fill_hatch (GSCHEM_TOPLEVEL *w_current, COLOR *color, PATH *path, gint fill_width, gint angle1, gint pitch1, gint angle2, gint pitch2) |
Fill inside of path with single line pattern. | |
static void | o_path_fill_mesh (GSCHEM_TOPLEVEL *w_current, COLOR *color, PATH *path, gint fill_width, gint angle1, gint pitch1, gint angle2, gint pitch2) |
Fill inside of path with mesh pattern. | |
void | o_path_draw (GSCHEM_TOPLEVEL *w_current, OBJECT *o_current) |
Draw a path on screen. | |
void | o_path_invalidate_rubber (GSCHEM_TOPLEVEL *w_current) |
void | o_path_draw_place (GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_current) |
Draw a path object after applying translation. | |
void | o_path_start (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y) |
Start process to input a new path. | |
void | o_path_end (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y) |
End the input of a path. | |
void | o_path_motion (GSCHEM_TOPLEVEL *w_current, int w_x, int w_y) |
Draw temporary path while dragging end. | |
void | o_path_draw_rubber (GSCHEM_TOPLEVEL *w_current) |
Draw path from GSCHEM_TOPLEVEL object. | |
static void | draw_control_lines (GSCHEM_TOPLEVEL *w_current, OBJECT *o_current) |
Draw lines between curve segment end-point and their control point. | |
void | o_path_draw_grips (GSCHEM_TOPLEVEL *w_current, OBJECT *o_current) |
Draw grip marks on path. |
typedef void(* FILL_FUNC)(GSCHEM_TOPLEVEL *w_current, COLOR *color, PATH *path, gint fill_width, gint angle1, gint pitch1, gint angle2, gint pitch2) |
static void hint_coordinates | ( | int | x, |
int | y, | ||
double * | fx, | ||
double * | fy, | ||
int | width | ||
) | [static] |
static void path_path | ( | GSCHEM_TOPLEVEL * | w_current, |
OBJECT * | object | ||
) | [static] |
static PATH* path_copy_modify | ( | PATH * | path, |
int | dx, | ||
int | dy, | ||
int | new_x, | ||
int | new_y, | ||
int | whichone | ||
) | [static] |
static void o_path_fill_hollow | ( | GSCHEM_TOPLEVEL * | w_current, |
COLOR * | color, | ||
PATH * | path, | ||
gint | fill_width, | ||
gint | angle1, | ||
gint | pitch1, | ||
gint | angle2, | ||
gint | pitch2 | ||
) | [static] |
[in] | w_current | Schematic top level |
[in] | color | Box fill color. |
[in] | path | The PATH object to draw |
[in] | fill_width | PATH pattern fill width. |
[in] | angle1 | 1st angle for pattern. |
[in] | pitch1 | 1st pitch for pattern. |
[in] | angle2 | 2nd angle for pattern. |
[in] | pitch2 | 2nd pitch for pattern. |
static void o_path_fill_fill | ( | GSCHEM_TOPLEVEL * | w_current, |
COLOR * | color, | ||
PATH * | path, | ||
gint | fill_width, | ||
gint | angle1, | ||
gint | pitch1, | ||
gint | angle2, | ||
gint | pitch2 | ||
) | [static] |
[in] | w_current | Schematic top level |
[in] | color | Box fill color. |
[in] | path | The PATH object to draw |
[in] | fill_width | PATH pattern fill width. |
[in] | angle1 | (unused) |
[in] | pitch1 | (unused) |
[in] | angle2 | (unused) |
[in] | pitch2 | (unused) |
static void o_path_fill_hatch | ( | GSCHEM_TOPLEVEL * | w_current, |
COLOR * | color, | ||
PATH * | path, | ||
gint | fill_width, | ||
gint | angle1, | ||
gint | pitch1, | ||
gint | angle2, | ||
gint | pitch2 | ||
) | [static] |
[in] | w_current | Schematic top level |
[in] | color | Box fill color. |
[in] | path | The PATH object to draw |
[in] | fill_width | PATH pattern fill width. |
[in] | angle1 | 1st angle for pattern. |
[in] | pitch1 | 1st pitch for pattern. |
[in] | angle2 | (unused) |
[in] | pitch2 | (unused) |
Definition at line 224 of file o_path.c.
static void o_path_fill_mesh | ( | GSCHEM_TOPLEVEL * | w_current, |
COLOR * | color, | ||
PATH * | path, | ||
gint | fill_width, | ||
gint | angle1, | ||
gint | pitch1, | ||
gint | angle2, | ||
gint | pitch2 | ||
) | [static] |
[in] | w_current | Schematic top level |
[in] | color | Box fill color. |
[in] | path | The PATH object to draw |
[in] | fill_width | PATH pattern fill width. |
[in] | angle1 | 1st angle for pattern. |
[in] | pitch1 | 1st pitch for pattern. |
[in] | angle2 | 2nd angle for pattern. |
[in] | pitch2 | 2nd pitch for pattern. |
Definition at line 269 of file o_path.c.
void o_path_draw | ( | GSCHEM_TOPLEVEL * | w_current, |
OBJECT * | o_current | ||
) |
[in] | w_current | The GSCHEM_TOPLEVEL object. |
[in] | o_current | The path OBJECT to draw. |
Definition at line 292 of file o_path.c.
void o_path_invalidate_rubber | ( | GSCHEM_TOPLEVEL * | w_current | ) |
void o_path_draw_place | ( | GSCHEM_TOPLEVEL * | w_current, |
int | dx, | ||
int | dy, | ||
OBJECT * | o_current | ||
) |
[in] | w_current | The GSCHEM_TOPLEVEL object. |
[in] | dx | Delta x coordinate for path. |
[in] | dy | Delta y coordinate for path. |
[in] | o_current | Line OBJECT to draw. |
Definition at line 442 of file o_path.c.
void o_path_start | ( | GSCHEM_TOPLEVEL * | w_current, |
int | w_x, | ||
int | w_y | ||
) |
During all the process, the path is internally represented by the two ends of the path as (w_current->first_wx,w_current->first_wy) and (w_current->second_wx,w_current->second_wy).
[in] | w_current | The GSCHEM_TOPLEVEL object. |
[in] | w_x | Current x coordinate of pointer in world units. |
[in] | w_y | Current y coordinate of pointer in world units. |
void o_path_end | ( | GSCHEM_TOPLEVEL * | w_current, |
int | w_x, | ||
int | w_y | ||
) |
It first erases the last temporary path displayed, calculates the corresponding world coordinates of the two ends of the path and finally adds a new initialized path object to the list of object of the current sheet.
[in] | w_current | The GSCHEM_TOPLEVEL object. |
[in] | w_x | (unused) |
[in] | w_y | (unused) |
void o_path_motion | ( | GSCHEM_TOPLEVEL * | w_current, |
int | w_x, | ||
int | w_y | ||
) |
[in] | w_current | The GSCHEM_TOPLEVEL object. |
[in] | w_x | Current x coordinate of pointer in world units. |
[in] | w_y | Current y coordinate of pointer in world units. |
Definition at line 513 of file o_path.c.
void o_path_draw_rubber | ( | GSCHEM_TOPLEVEL * | w_current | ) |
[in] | w_current | The GSCHEM_TOPLEVEL object. |
Definition at line 535 of file o_path.c.
static void draw_control_lines | ( | GSCHEM_TOPLEVEL * | w_current, |
OBJECT * | o_current | ||
) | [static] |
void o_path_draw_grips | ( | GSCHEM_TOPLEVEL * | w_current, |
OBJECT * | o_current | ||
) |