gschem

x_grid.c File Reference

#include <config.h>
#include <math.h>
#include "gschem.h"
Include dependency graph for x_grid.c:

Go to the source code of this file.

Defines

#define DOTS_POINTS_ARRAY_SIZE   5000
#define DOTS_VARIABLE_MODE_SPACING   30
#define MESH_COARSE_GRID_MULTIPLIER   5

Functions

static int query_dots_grid_spacing (GSCHEM_TOPLEVEL *w_current)
 Query the spacing in world coordinates at which the dots grid is drawn.
static void draw_dots_grid_region (GSCHEM_TOPLEVEL *w_current, int x, int y, int width, int height)
 Draw an area of the screen with a dotted grid pattern.
static void draw_mesh (GSCHEM_TOPLEVEL *w_current, int color, int x_start, int y_start, int x_end, int y_end, int incr, int coarse_mult)
 Helper function for draw_mesh_grid_regin.
static int query_mesh_grid_spacing (GSCHEM_TOPLEVEL *w_current)
 Query the spacing in world coordinates at which the mesh grid is drawn.
static void draw_mesh_grid_region (GSCHEM_TOPLEVEL *w_current, int x, int y, int width, int height)
 Draw an area of the screen with a mesh grid pattern.
void x_grid_draw_region (GSCHEM_TOPLEVEL *w_current, int x, int y, int width, int height)
 Draw an area of the screen with the current grid pattern.
int x_grid_query_drawn_spacing (GSCHEM_TOPLEVEL *w_current)
 Query the spacing in world coordinates at which the grid is drawn.
void x_draw_tiles (GSCHEM_TOPLEVEL *w_current)

Define Documentation

#define DOTS_POINTS_ARRAY_SIZE   5000

Definition at line 33 of file x_grid.c.

#define DOTS_VARIABLE_MODE_SPACING   30

Definition at line 34 of file x_grid.c.

#define MESH_COARSE_GRID_MULTIPLIER   5

Definition at line 36 of file x_grid.c.


Function Documentation

static int query_dots_grid_spacing ( GSCHEM_TOPLEVEL w_current) [static]
Function Description
Returns the world spacing of the rendered grid, taking into account where the grid drawing code may drop elelments which are too densly packed for a given zoom level.
Parameters:
[in]w_currentThe GSCHEM_TOPLEVEL.
Returns:
The grid spacing in world units of the grid as rendered, or -1 if there are no items drawn.

Definition at line 50 of file x_grid.c.

Here is the call graph for this function:

static void draw_dots_grid_region ( GSCHEM_TOPLEVEL w_current,
int  x,
int  y,
int  width,
int  height 
) [static]
Function Description
Draws the dotted grid pattern over a given region of the screen.
Parameters:
[in]w_currentThe GSCHEM_TOPLEVEL.
[in]xThe left screen coordinate for the drawing.
[in]yThe top screen coordinate for the drawing.
[in]widthThe width of the region to draw.
[in]heightThe height of the region to draw.

Definition at line 90 of file x_grid.c.

Here is the call graph for this function:

static void draw_mesh ( GSCHEM_TOPLEVEL w_current,
int  color,
int  x_start,
int  y_start,
int  x_end,
int  y_end,
int  incr,
int  coarse_mult 
) [static]

Definition at line 154 of file x_grid.c.

Here is the call graph for this function:

static int query_mesh_grid_spacing ( GSCHEM_TOPLEVEL w_current) [static]
Function Description
Returns the world spacing of the rendered grid, taking into account where the grid drawing code may drop elelments which are too densly packed for a given zoom level.
Parameters:
[in]w_currentThe GSCHEM_TOPLEVEL.
Returns:
The grid spacing in world units of the grid as rendered, or -1 if there are no items drawn.

Definition at line 227 of file x_grid.c.

Here is the call graph for this function:

static void draw_mesh_grid_region ( GSCHEM_TOPLEVEL w_current,
int  x,
int  y,
int  width,
int  height 
) [static]
Function Description
Draws the mesh grid pattern over a given region of the screen.
Parameters:
[in]w_currentThe GSCHEM_TOPLEVEL.
[in]xThe left screen coordinate for the drawing.
[in]yThe top screen coordinate for the drawing.
[in]widthThe width of the region to draw.
[in]heightThe height of the region to draw.

Definition at line 260 of file x_grid.c.

Here is the call graph for this function:

void x_grid_draw_region ( GSCHEM_TOPLEVEL w_current,
int  x,
int  y,
int  width,
int  height 
)
Function Description
Draws the desired grid pattern over a given region of the screen.
Parameters:
[in]w_currentThe GSCHEM_TOPLEVEL.
[in]xThe left screen coordinate for the drawing.
[in]yThe top screen coordinate for the drawing.
[in]widthThe width of the region to draw.
[in]heightThe height of the region to draw.

Definition at line 301 of file x_grid.c.

Here is the call graph for this function:

int x_grid_query_drawn_spacing ( GSCHEM_TOPLEVEL w_current)
Function Description
Returns the world spacing of the rendered grid, taking into account where the grid drawing code may drop elelments which are too densly packed for a given zoom level.
Parameters:
[in]w_currentThe GSCHEM_TOPLEVEL.
Returns:
The grid spacing in world units of the grid as rendered, or -1 if there are no items drawn.

Definition at line 335 of file x_grid.c.

Here is the call graph for this function:

void x_draw_tiles ( GSCHEM_TOPLEVEL w_current)
Todo:
Finish function documentation!!!
Function Description

Definition at line 351 of file x_grid.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines