Navigation

Main Page
Download
Support
Installation
Tutorial
Examples
Reference Manual
   Version 1.0.6dev
      Class Index
      File List
   Version 1.0.6
   Version 1.0.5new_solver
   Version 1.0.5dev
   Version 1.0.5b
   Version 1.0.4dev
   Version 1.0.4
Publications


Hosted by Get Ion Beam Simulator at SourceForge.net. Fast, secure and Free Open Source software downloads
LineClip Class Reference

Line clipper. More...

#include <lineclip.hpp>

Public Member Functions

 LineClip (cairo_t *cairo)
 Construct line clipper. More...
 
 ~LineClip ()
 Destructor. More...
 
void set (double xmin, double ymin, double xmax, double ymax)
 Set clipping area. More...
 
void reset ()
 Reset clip. More...
 
void move_to (double x, double y)
 Move to (x,y) More...
 
void line_to (double x, double y)
 Line to (x,y) More...
 
void curve_to (double x1, double y1, double x2, double y2, double x3, double y3)
 Curve to (x,y) More...
 
void close_path ()
 Close path. More...
 
void fill ()
 Close path and fill enclosed area. More...
 

Detailed Description

Line clipper.

Cairo graphics coordinates are internally handled using fixed point algebra for speed. This causes problems in clipping algorithm when there are large scale differences in coordinates. This class is provided for the user to overcome this problem by using floating point algebra for line clipping.

Constructor & Destructor Documentation

◆ LineClip()

LineClip::LineClip ( cairo_t *  cairo)

Construct line clipper.

◆ ~LineClip()

LineClip::~LineClip ( )

Destructor.

Member Function Documentation

◆ close_path()

void LineClip::close_path ( )

Close path.

◆ curve_to()

void LineClip::curve_to ( double  x1,
double  y1,
double  x2,
double  y2,
double  x3,
double  y3 
)

Curve to (x,y)

Curve is drawn with lines in cairo. Number is subdivisions is made large enough to contain the error at typically less than 1 pixel.

◆ fill()

void LineClip::fill ( )

Close path and fill enclosed area.

◆ line_to()

void LineClip::line_to ( double  x,
double  y 
)

Line to (x,y)

◆ move_to()

void LineClip::move_to ( double  x,
double  y 
)

Move to (x,y)

◆ reset()

void LineClip::reset ( )

Reset clip.

Sets clip limits to infinity and forgets last coordinate.

◆ set()

void LineClip::set ( double  xmin,
double  ymin,
double  xmax,
double  ymax 
)

Set clipping area.


The documentation for this class was generated from the following files:


Reference manual for Ion Beam Simulator 1.0.6dev
Generated by Doxygen 1.9.1 on Thu Sep 11 2025 09:37:24.