X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Frenddesc.h;h=cce4fd32bfa5df29ce8c3adeb6f6b90aa822bc7b;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=1498fe84f2f68dd63c0557038a1c30869d989f42;hpb=e3acc0b267b14fda5db3c7bbb2f218b993ef84b3;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/renddesc.h b/synfig-core/trunk/src/synfig/renddesc.h index 1498fe8..cce4fd3 100644 --- a/synfig-core/trunk/src/synfig/renddesc.h +++ b/synfig-core/trunk/src/synfig/renddesc.h @@ -1,28 +1,30 @@ -/* === S I N F G =========================================================== */ -/*! \file renddesc.h +/* === S Y N F I G ========================================================= */ +/*! \file synfig/renddesc.h ** \brief Template Header ** -** $Id: renddesc.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $ +** $Id$ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ /* === S T A R T =========================================================== */ -#ifndef __SINFG_RENDERDESC_H -#define __SINFG_RENDERDESC_H +#ifndef __SYNFIG_RENDERDESC_H +#define __SYNFIG_RENDERDESC_H /* === H E A D E R S ======================================================= */ @@ -43,7 +45,7 @@ /* === C L A S S E S & S T R U C T S ======================================= */ -namespace sinfg { +namespace synfig { /*! \class RendDesc ** \todo writeme @@ -53,25 +55,25 @@ class RendDesc public: enum Lock { - PX_ASPECT=(1<<0), - PX_AREA=(1<<1), - PX_W=(1<<2), - PX_H=(1<<3), - - IM_ASPECT=(1<<4), - IM_SPAN=(1<<5), - IM_W=(1<<6), - IM_H=(1<<7), - IM_ZOOMIN=(1<<8), - IM_ZOOMOUT=(1<<9), - - LINK_PX_ASPECT=(1<<10), - LINK_PX_AREA=(1<<11), - LINK_IM_ASPECT=(1<<12), - LINK_IM_SPAN=(1<<13), - LINK_IM_CENTER=(1<<14) + PX_ASPECT=(1<<0), // "Pixel Aspect" in Locks and Links + PX_AREA=(1<<1), // not used + PX_W=(1<<2), // "Pixel Width" in Locks and Links - not used + PX_H=(1<<3), // "Pixel Height" in Locks and Links - not used + + IM_ASPECT=(1<<4), // "Image Aspect" in Locks and Links + IM_SPAN=(1<<5), // "Image Span" in Locks and Links + IM_W=(1<<6), // "Image Width" in Locks and Links + IM_H=(1<<7), // "Image Height" in Locks and Links + IM_ZOOMIN=(1<<8), // not used + IM_ZOOMOUT=(1<<9), // not used + + LINK_PX_ASPECT=(1<<10), // not used + LINK_PX_AREA=(1<<11), // not used + LINK_IM_ASPECT=(1<<12), // not used + LINK_IM_SPAN=(1<<13), // not used + LINK_IM_CENTER=(1<<14) // not used }; - + private: int w_,h_; Real x_res; @@ -87,7 +89,7 @@ private: float frame_rate; Time time_begin, time_end; - + public: enum @@ -117,10 +119,10 @@ public: time_begin (0), time_end (0) { } - + //! \writeme RendDesc &apply(const RendDesc &x); - + //! \writeme const Color &get_bg_color()const; @@ -153,7 +155,7 @@ public: //! Sets the horizontal resolution (in dots per meter) RendDesc &set_x_res(Real x); - + //! Returns the vertical resolution (in dots per meter) Real get_y_res()const; @@ -179,22 +181,22 @@ public: //! Set the index of the first frame RendDesc &set_frame_start(int x); - + //! Return the index of the last frame int get_frame_end()const; - + //! Set the index of the last frame RendDesc &set_frame_end(int x); //! Return the starting time of the animation const Time get_time_start()const; - + //! Set the time that the animation will start RendDesc &set_time_start(Time x); //! Return the end time of the animation const Time get_time_end()const; - + //! Set the time that the animation will end RendDesc &set_time_end(Time x); @@ -206,25 +208,25 @@ public: //! Return the frame rate (frames-per-second) const float &get_frame_rate()const; - + //! Set the frame rate (frames-per-second) RendDesc &set_frame_rate(float x); //! Return the status of the interlaced flag const bool &get_interlaced()const; - + //! Set the interlace flag RendDesc &set_interlaced(bool x); //! Return the status of the clamp flag const bool &get_clamp()const; - + //! Set the clamp flag RendDesc &set_clamp(bool x); //! Set constraint flags RendDesc &set_flags(const int &x); - + //! Clear constraint flags RendDesc &clear_flags(); @@ -236,11 +238,11 @@ public: //! Return the aspect ratio of the entire image Point::value_type get_image_aspect()const; - + //! Return the antialias amount const int &get_antialias()const; - //! Set the antilaias amount + //! Set the antialias amount RendDesc &set_antialias(const int &x); //! Return the distance from the bottom-right to the top-left @@ -258,17 +260,17 @@ public: RendDesc &set_focus(const Point &x); const Point &get_tl()const; - + RendDesc &set_tl(const Point &x); const Point &get_br()const; - + RendDesc &set_br(const Point &x); - + Rect get_rect()const { return Rect(get_tl(),get_br()); } RendDesc &set_viewport(const Point &__tl, const Point &__br); - + RendDesc &set_viewport(Vector::value_type a,Vector::value_type b,Vector::value_type c,Vector::value_type d); //! Returns the width of one pixel @@ -277,7 +279,7 @@ public: //! Returns the height of one pixel Real get_ph()const; - //! Sets viewport to represent the screen at the give pixel coordinates + //! Sets viewport to represent the screen at the given pixel coordinates RendDesc &set_subwindow(int x, int y, int w, int h); }; // END of class RendDesc @@ -302,17 +304,7 @@ inline RendDesc::Lock operator~(RendDesc::Lock rhs) return static_cast(~(int)rhs); } -//! This operator is for checking RendDesc::Lock flags. -/*! Don't think of it as "less then or equal to", but think of it -** like an arrow. Is \a rhs inside of \a lhs ? -** \see RendDesc::Lock, RendDesc */ -inline bool operator<=(RendDesc::Lock lhs, RendDesc::Lock rhs) -{ - return static_cast(lhs) & static_cast(rhs)==static_cast(rhs); -} - - -}; /* end namespace sinfg */ +}; /* end namespace synfig */ /* === E N D =============================================================== */