view engine/swigwrappers/python/extensions.i.templ @ 589:d1df6cf5ff23

* Fixed a bug in RenderBackendSDL, the clip area was not properly set. * Renamed the backquad and border commands of the FloatingTextRenderer. * Added the TransparentArea commands to the InstanceRenderer. Note: with addTransparentArea(instance, string, width, height, transparent, front) you can enable an area, that make all instances in this zone and with the same namespace transparent. The string is for the namespace, so you can set one or more namespaces to be transparent. Width and height specifies the size of the area. Transparent defines the intensity of transparency, 255 = invisible. The bool front, enable or disable the z check, so that only instances in front of the source instance could be transparent.
author helios2000@33b003aa-7bff-0310-803a-e67f0ece8222
date Fri, 13 Aug 2010 16:33:36 +0000
parents 4a0efb7baf70
children c0c3f64bfc2d
line wrap: on
line source

namespace FIFE {
	
	%extend PointType2D<int> {
		int getX() { return $self->x; }
		int getY() { return $self->y; }
		void setX(int _x) { $self->x = _x; }
		void setY(int _y) { $self->y = _y; }
		
		std::string __str__() {
			std::stringstream str;
			str << "Point" << *$self;
			return  str.str();
		}
	};
	
	%extend PointType2D<double> {
		double getX() { return $self->x; }
		double getY() { return $self->y; }
		void setX(double _x) { $self->x = _x; }
		void setY(double _y) { $self->y = _y; }
		
		std::string __str__() {
			std::stringstream str;
			str << "DoublePoint" << *$self;
			return  str.str();
		}
	};
	
	%extend PointType3D<int> {
		std::string __str__() {
			std::stringstream str;
			str << "Point3D" << *$self;
			return  str.str();
		}
	};
	
	%extend PointType3D<double> {
		std::string __str__() {
			std::stringstream str;
			str << "DoublePoint3D" << *$self;
			return  str.str();
		}
	};
		
	%extend Rect {
		int getX() { return $self->x; }
		int getY() { return $self->y; }
		void setX(int _x) { $self->x = _x; }
		void setY(int _y) { $self->y = _y; }
	
		int getW() { return $self->w; }
		int getH() { return $self->h; }
		void setW(int _w) { $self->w = _w; }
		void setH(int _h) { $self->h = _h; }
	
		std::string __str__() {
			std::stringstream str;
			str << "Rect" << *$self;
			return  str.str();
		}
	};
}