pcb 4.1.1
An interactive printed circuit board layout editor.

clip.c File Reference

Functions for inserting points into objects. More...

#include <assert.h>
#include <math.h>
#include <stdlib.h>
#include "global.h"
#include "data.h"
#include "draw.h"
#include "mymem.h"
Include dependency graph for clip.c:

Go to the source code of this file.

Functions

bool ClipLine (double minx, double miny, double maxx, double maxy, double *x1, double *y1, double *x2, double *y2, double margin)
 Clip the line to the clipBox.

Detailed Description

Functions for inserting points into objects.


Copyright.


PCB, interactive printed circuit board design

Copyright (C) 1994,1995,1996 Thomas Nau

Copyright (C) 2004 harry eaton

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Contact addresses for paper mail and Email: Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany Thomas.Nau@rz.uni-ulm.de

Definition in file clip.c.


Function Documentation

bool ClipLine ( double  minx,
double  miny,
double  maxx,
double  maxy,
double *  x1,
double *  y1,
double *  x2,
double *  y2,
double  margin 
)

Clip the line to the clipBox.

Clip X,Y to the given bounding box, plus a margin.

Returns:
true if something to be drawn, false if the whole thing is clipped.

Definition at line 62 of file clip.c.

References maxx, maxy, minx, and miny.

Referenced by ghid_draw_line(), and lesstif_draw_line().