~ubuntu-branches/debian/sid/kxstitch/sid

« back to all changes in this revision

Viewing changes to kxstitch/stitch.cpp

  • Committer: Bazaar Package Importer
  • Author(s): eric pareja
  • Date: 2005-02-19 12:37:22 UTC
  • Revision ID: james.westby@ubuntu.com-20050219123722-kt3ru1nqvllietee
Tags: upstream-0.6
ImportĀ upstreamĀ versionĀ 0.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2003 by Stephen Allewell                                *
 
3
 *   stephen@mirramar.fsnet.co.uk                                          *
 
4
 *                                                                         *
 
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
 ***************************************************************************/
 
10
 
 
11
#include "stitch.h"
 
12
 
 
13
Stitch::Stitch(Type t, int i)
 
14
  : type(t),
 
15
    floss(i)
 
16
{
 
17
}
 
18
 
 
19
BackStitch::BackStitch(QPoint s, QPoint e, int i)
 
20
  : start(s),
 
21
    end(e),
 
22
    floss(i)
 
23
{
 
24
}
 
25
 
 
26
bool BackStitch::contains(QPoint p)
 
27
{
 
28
  if (start == p || end == p) return true;
 
29
  return false;
 
30
}
 
31
 
 
32
Knot::Knot(QPoint p, int i)
 
33
  : pos(p),
 
34
    floss(i)
 
35
{
 
36
}