Click here to Skip to main content
15,895,557 members
Articles / Desktop Programming / Win32

Using Assembler and SSE2/SSE3 instructions for drawing optimization

Rate me:
Please Sign up or sign in to vote.
4.92/5 (24 votes)
29 Jul 2009CPOL10 min read 52.4K   1.2K   64  
Introduce the algorithm and technique for pre-drawing process speed up.
#pragma once
#include "PointD.h"
using namespace System::Drawing;
using namespace System::Collections::Generic;
namespace FastTransform
{
namespace Elements
{
	//class to manage memory used during tranfromation and 
	//to perform unmanaged function call
		public ref class Transformer
		{
		private:
			//Array to store int converted values
			array<int>^ piConvertBuffer;
			//Array to store double converted values
			array<double>^ pdConvertBuffer;
			//array to store discontinuity points indexes
			array<unsigned int>^ piDiscontinuity;
		public:
			// Function performs the points transformation, clipping, and simplification
			List<array<Point>^>^ TransformDblToInt(
			array<PointD>^ dPoints, // input Points array
			double m00, //
			double m10,
			double m20,
			double m01,
			double m11,
			double m21,
			double dXMin,
			double dYMin,
			double dXMax,
			double dYMax);
			// Function performs the points transformation, clipping, and simplification
			List<array<Point>^>^ TransformDblToInt(
			array<PointD>^ dPoints, // input Points array
			System::Drawing::Drawing2D::Matrix oMatrix,
			System::Drawing::RectangleF oClipRect);

			//Constructor
			Transformer(void);
			//Constructor
			Transformer(int iInitialBufSize);

		};

}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Citrix Japan R&D
Japan Japan
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions