1
/***************************************************************************
2
* Copyright (C) 2003 by Stephen Allewell *
3
* stephen@mirramar.fsnet.co.uk *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
***************************************************************************/
14
#include <qptrqueue.h>
17
/** Store information about individual stitches.
18
@author Stephen P. Allewell
20
Stitches encoded as follows
44
enum Type {Delete=0,TLQtr=1,TRQtr=2,BLQtr=4,BTHalf=6,TL3Qtr=7,BRQtr=8,TBHalf=9,TR3Qtr=11,BL3Qtr=13,BR3Qtr=14,Full=15,FRKnot=16};
45
typedef QPtrQueue<Stitch> Queue;
48
@param t StitchType of stitch to be stored.
49
@param i Index into the floss table.
51
Stitch(Type t, int i);
57
/** Stores the start and end coordinates and the color of a backstitch
58
@author Stephen P. Allewell
64
@param s Start coordinate
65
@param e End coordinate
66
@param i Index into the color palette
68
BackStitch(QPoint s, QPoint e, int i);
69
/** Tests to see if a coordinate is the start or end of the current backstitch
70
@return TRUE if p is the start or end of this backstitch, FALSE otherwise.
71
@param p Coordinate to be checked.
73
bool contains(QPoint p);
80
/** Store information about a french knot
81
@author Stephen P. Allewell
87
@param p The coordinates of the knot.
88
@param i The index into the floss table.
90
Knot(QPoint p, int i);