FHTransform.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /*
00003  * This file is part of the libfreehand project.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  */
00009 
00010 #ifndef __FHTRANSFORM_H__
00011 #define __FHTRANSFORM_H__
00012 
00013 #include <math.h>
00014 
00015 namespace libfreehand
00016 {
00017 
00018 class FHTransform
00019 {
00020 public:
00021   FHTransform();
00022   FHTransform(double m11, double m21, double m12, double m22, double m13, double m23);
00023   FHTransform(const FHTransform &trafo);
00024 
00025   void applyToPoint(double &x, double &y) const;
00026   void applyToArc(double &rx, double &ry, double &rotation, bool &sweep, double &endx, double &endy) const;
00027 
00028 private:
00029   double m_m11;
00030   double m_m21;
00031   double m_m12;
00032   double m_m22;
00033   double m_m13;
00034   double m_m23;
00035 };
00036 
00037 } // namespace libfreehand
00038 
00039 #endif /* __FHTRANSFORM_H__ */
00040 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */