Back to index

kdeartwork  4.3.2
Classes | Public Member Functions | Private Attributes
Lines Class Reference

#include <lines.h>

Collaboration diagram for Lines:
Collaboration graph
[legend]

List of all members.

Classes

struct  Ln

Public Member Functions

 Lines (int)
 ~Lines ()
void reset ()
void getKoord (int &, int &, int &, int &)
void setKoord (const int &, const int &, const int &, const int &)
void next (void)
void turn (const int &, const int &)

Private Attributes

Lnstart
Lnend
Lnakt
int offx1
int offy1
int offx2
int offy2
uint numLn

Detailed Description

Definition at line 19 of file lines.h.


Class Documentation

struct Lines::Ln

Definition at line 21 of file lines.h.

Collaboration diagram for Lines::Ln:
Class Members
Ln * next
int x1
int x2
int y1
int y2

Constructor & Destructor Documentation

Lines::Lines ( int  x)

Definition at line 63 of file lines.cpp.

                 {
       uint i;
       numLn=x;
       offx1=12;
       offy1=16;
       offx2=9;
       offy2=10;
       start=new Ln;
       end=start;
       for(i=1; i<numLn; i++){
              end->next=new Ln;
              end=end->next;
       }
       end->next=start;
       akt=start;
}

Definition at line 80 of file lines.cpp.

             {
       uint i;
       for(i=0; i<numLn; i++){
              end=start->next;
              delete start;
              start=end;
       }
}

Member Function Documentation

void Lines::getKoord ( int &  a,
int &  b,
int &  c,
int &  d 
) [inline]

Definition at line 91 of file lines.cpp.

                                                         {
       a=akt->x1; b=akt->y1;
       c=akt->x2; d=akt->y2;
       akt=akt->next;
}

Here is the caller graph for this function:

void Lines::next ( void  ) [inline]

Definition at line 102 of file lines.cpp.

{ akt=akt->next; }

Here is the caller graph for this function:

void Lines::reset ( ) [inline]

Definition at line 89 of file lines.cpp.

{      akt=start;    }

Here is the caller graph for this function:

void Lines::setKoord ( const int &  a,
const int &  b,
const int &  c,
const int &  d 
) [inline]

Definition at line 97 of file lines.cpp.

                                                                                 {
       akt->x1=a; akt->y1=b;
       akt->x2=c; akt->y2=d;
}

Here is the caller graph for this function:

void Lines::turn ( const int &  w,
const int &  h 
)

Definition at line 104 of file lines.cpp.

                                          {
       start->x1=end->x1+offx1;
       start->y1=end->y1+offy1;
       start->x2=end->x2+offx2;
       start->y2=end->y2+offy2;
       if(start->x1>=w) offx1=-8;
       if(start->x1<=0) offx1=7;
       if(start->y1>=h) offy1=-11;
       if(start->y1<=0) offy1=13;
       if(start->x2>=w) offx2=-17;
       if(start->x2<=0) offx2=15;
       if(start->y2>=h) offy2=-10;
       if(start->y2<=0) offy2=13;
       end->next=start;
       start=start->next;
       end=end->next;
}

Here is the caller graph for this function:


Member Data Documentation

Ln * Lines::akt [private]

Definition at line 25 of file lines.h.

Ln * Lines::end [private]

Definition at line 25 of file lines.h.

uint Lines::numLn [private]

Definition at line 27 of file lines.h.

int Lines::offx1 [private]

Definition at line 26 of file lines.h.

int Lines::offx2 [private]

Definition at line 26 of file lines.h.

int Lines::offy1 [private]

Definition at line 26 of file lines.h.

int Lines::offy2 [private]

Definition at line 26 of file lines.h.

Ln* Lines::start [private]

Definition at line 25 of file lines.h.


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