papyrus logo

matrix.cpp File Reference

#include "matrix.h"
#include <iostream>
#include <sstream>
Include dependency graph for matrix.cpp:

Namespaces

namespace  Papyrus

Defines

#define REGEX_exponent   "(?:[eE][-+]?\\d+)"
#define REGEX_fractional_constant   "\\d*[.]\\d+|\\d+[.]"
#define REGEX_floating_point_constant   "(?:" REGEX_fractional_constant REGEX_exponent "?|\\d+" REGEX_exponent ")"
#define REGEX_comma_wsp   "(?:\\s+[,]?\\s*|[,]\\s*)"
#define REGEX_number   "([-+]?\\d+|[-+]?" REGEX_floating_point_constant ")"
#define REGEX_skewY   "(?:(skewY)\\s*\\(\\s*" REGEX_number "\\s*\\))"
#define REGEX_skewX   "(?:(skewX)\\s*\\(\\s*" REGEX_number "\\s*\\))"
#define REGEX_rotate   "(?:(rotate)\\s*\\(\\s*" REGEX_number "(?:" REGEX_comma_wsp REGEX_number REGEX_comma_wsp REGEX_number ")?" "\\s*\\))"
#define REGEX_scale   "(?:(scale)\\s*\\(\\s*" REGEX_number "(?:" REGEX_comma_wsp REGEX_number ")?" "\\s*\\))"
#define REGEX_translate   "(?:(translate)\\s*\\(\\s*" REGEX_number "(?:" REGEX_comma_wsp REGEX_number ")?" "\\s*\\))"
#define REGEX_matrix   "(?:(matrix)\\s*\\(\\s*" REGEX_number REGEX_comma_wsp REGEX_number REGEX_comma_wsp REGEX_number REGEX_comma_wsp REGEX_number REGEX_comma_wsp REGEX_number REGEX_comma_wsp REGEX_number "\\s*\\))"
#define REGEX_transform   REGEX_matrix "|" REGEX_translate "|" REGEX_scale "|" REGEX_rotate "|" REGEX_skewX "|" REGEX_skewY
#define REGEX_transforms   REGEX_transform "(?:" REGEX_comma_wsp "+" REGEX_transform ")*"
#define REGEX_transform_list   "\\s*" REGEX_transforms "\\s*"

Typedefs

typedef enum Papyrus::Xform Papyrus::Xform

Enumerations

enum  Papyrus::Xform {
  Papyrus::XFORM_NONE = 0, Papyrus::XFORM_MATRIX, Papyrus::XFORM_TRANSLATE, Papyrus::XFORM_SCALE,
  Papyrus::XFORM_ROTATE, Papyrus::XFORM_SKEWX, Papyrus::XFORM_SKEWY
}

Functions

bool Papyrus::has_digit (const Glib::ustring &s)
Xform Papyrus::which_transform (const Glib::ustring &s)
bool operator== (const Papyrus::Matrix::pointer m1, const Papyrus::Matrix &m2)
bool operator!= (const Papyrus::Matrix::pointer m1, const Papyrus::Matrix &m2)

Define Documentation

#define REGEX_comma_wsp   "(?:\\s+[,]?\\s*|[,]\\s*)"
#define REGEX_exponent   "(?:[eE][-+]?\\d+)"
#define REGEX_floating_point_constant   "(?:" REGEX_fractional_constant REGEX_exponent "?|\\d+" REGEX_exponent ")"
#define REGEX_fractional_constant   "\\d*[.]\\d+|\\d+[.]"
#define REGEX_matrix   "(?:(matrix)\\s*\\(\\s*" REGEX_number REGEX_comma_wsp REGEX_number REGEX_comma_wsp REGEX_number REGEX_comma_wsp REGEX_number REGEX_comma_wsp REGEX_number REGEX_comma_wsp REGEX_number "\\s*\\))"
#define REGEX_number   "([-+]?\\d+|[-+]?" REGEX_floating_point_constant ")"
#define REGEX_rotate   "(?:(rotate)\\s*\\(\\s*" REGEX_number "(?:" REGEX_comma_wsp REGEX_number REGEX_comma_wsp REGEX_number ")?" "\\s*\\))"
#define REGEX_scale   "(?:(scale)\\s*\\(\\s*" REGEX_number "(?:" REGEX_comma_wsp REGEX_number ")?" "\\s*\\))"
#define REGEX_skewX   "(?:(skewX)\\s*\\(\\s*" REGEX_number "\\s*\\))"
#define REGEX_skewY   "(?:(skewY)\\s*\\(\\s*" REGEX_number "\\s*\\))"
#define REGEX_transform   REGEX_matrix "|" REGEX_translate "|" REGEX_scale "|" REGEX_rotate "|" REGEX_skewX "|" REGEX_skewY
#define REGEX_transform_list   "\\s*" REGEX_transforms "\\s*"

Referenced by Papyrus::Matrix::set().

#define REGEX_transforms   REGEX_transform "(?:" REGEX_comma_wsp "+" REGEX_transform ")*"
#define REGEX_translate   "(?:(translate)\\s*\\(\\s*" REGEX_number "(?:" REGEX_comma_wsp REGEX_number ")?" "\\s*\\))"

Function Documentation

bool operator!= ( const Papyrus::Matrix::pointer  m1,
const Papyrus::Matrix m2 
)
bool operator== ( const Papyrus::Matrix::pointer  m1,
const Papyrus::Matrix m2 
)

Generated on Fri Apr 16 12:40:38 2010 for papyrus by doxygen 1.6.1