|
Licensing the Universal Forms source code enables the limitless capabilities of embedding and extending it to meet your complex and unique challenges.
- The UForms source code is Little/Big endian compatible and 32/64bit clean ANSI C++. Whether you are developing for Windows, Unix, Mac OSX, or even a custom embedded device, Universal Forms is ready to meet your complex and unique imaging, compositing, and data visualization needs.
- The UForms Engine is small ( < 1MB executable footprint ), completely self-contained, and does not rely on an Operating system's graphics rendering API. High quality image scaling and image rendering can be integrated directly into a hand-held device, such as a mobile phone. UForms is ideal for embedded applications with little memory or a ROM based file system.
- UForms is Object Oriented and highly compartmentalized. The whole system or part of the engine can be integrated into your application without the need to re-distribute a separate library or executable. UForms can be integrated natively into an internet appliance to serve dynamic images that are optimized for handheld devices.
- Adding new functionality, such as database connectivity and special-purpose layout element types, is easy due to the internal API standardization. UForms can be extended to support your own proprietary protocols or to read directly from your internal data structures.
- The UForms Engine is fast. UForms is capable of rendering a real-time display, such as a medical device display, kiosk interface, or stock performance charts at up to 30fps.
Sample Source Code
class CUFSurface_Flash : public CUFSurface
{
public:
CUFSurface_Flash();
~CUFSurface_Flash();
bool Create(LPCWSTR szPath, double dWidth, double dHeight);
void Close();
protected:
// ------------------------------ Output Functions ------------------------------
// Draw a single line
virtual void Line(
double x1,
double y1,
double x2,
double y2,
uf::ARGBCOLOR c,
double dXWidth,
double dYWidth
);
// Draw a bitmap image
virtual void Bitmap(
double SurfaceX1,
double SurfaceY1,
double SurfaceX2,
double SurfaceY2,
double BitmapX1,
double BitmapY1,
double BitmapX2,
double BitmapY2,
CUFSurface_Raster *pBitmap
);
// Draw a polygon
virtual void Polygon(
int cPoints,
CUFSurface::tag2dPoint *pPoints,
uf::ARGBCOLOR ic,
bool bBorder,
uf::ARGBCOLOR bc,
double dBorderXWidth,
double dBorderYWidth
);
// Draw a polygon, filled with a linear gradient
virtual void DirectionalGradientPolygon(
int cPoints,
CUFSurface::tag2dPoint *pPoints,
CUFSurface::tag2dPoint &GradientPoint1,
CUFSurface::tag2dPoint &GradientPoint2,
uf::ARGBCOLOR GradientColor1,
uf::ARGBCOLOR GradientColor2,
bool bBorder,
uf::ARGBCOLOR BorderColor,
double dBorderXWidth,
double dBorderYWidth
);
// Draw a text component
virtual void DrawGlyphComponent(
CUFTrueTypeFont::tagGlyph::tagGlyphContour *pComponent,
uf::ARGBCOLOR c
);
double m_dOffsetX, m_dOffsetY;
private:
FILE *m_hFile;
unsigned __int8 m_iNextBit;
unsigned __int8 m_iBuildByte;
unsigned __int32 m_cBytes;
unsigned __int16 m_cShapes;
// ----- Integer Types -----
// Written to file in little endian order; byte aligned
void WriteSI8(__int8 iVal); // Signed 8-bit integer
void WriteSI16(__int16 iVal); // Signed 16-bit integer
void WriteSI32(__int32 iVal); // Signed 32-bit integer
void WriteSI8n(__int8 *pVal, unsigned __int32 nVal); // Signed 8-bit array
void WriteSI16n(__int16 *pVal, unsigned __int32 nVal); // Signed 16-bit array
void WriteUI8(unsigned __int8 iVal); // Unsigned 8-bit integer
void WriteUI16(unsigned __int16 iVal); // Unsigned 16-bit integer
void WriteUI32(unsigned __int32 iVal); // Unsigned 32-bit integer
void WriteUI8n(unsigned __int8 *pVal, unsigned __int32 nVal); // Unsigned 8-bit array
void WriteUI16n(unsigned __int16 *pVal, unsigned __int32 nVal); // Unsigned 16-bit array
// ----- Fixed Point Type -----
// Signed 16.16 fixed point number, written to file in little endian order; byte aligned
void WriteFixed(__int16 iMantissa, unsigned __int16 iFraction);
void WriteFixed(__int32 iFixed);
void WriteFixed(double dVal);
// ----- Bit Values -----
// Written to file in little endian order; arbitrary number of bits; not byte aligned
void WriteSB(__int32 iVal, unsigned __int8 nBits); // Signed n-bit integer
void WriteUB(unsigned __int32 iVal, unsigned __int8 nBits); // Unsigned n-bit integer
void WriteFB(__int16 iMantissa, unsigned __int16 iFraction, unsigned __int8 nBits); // Signed n-bit 16.16 fixed point number
void WriteFB(__int32 iFixed, unsigned __int8 nBits); // Signed n-bit 16.16 fixed point number
void WriteFB(double dVal, unsigned __int8 nBits); // Signed n-bit 16.16 fixed point number
void FlushBits(); // Writes any partial bytes to the file, to be followed by a byte-aligned value or end of file
void WritePartialByte(unsigned __int8 iByte, unsigned __int8 nBits);
static unsigned __int8 MinBitsSB(__int32 iVal); // Returns the minimum number of bits required to store a signed integer
static unsigned __int8 MinBitsUB(__int32 iVal); // Returns the minimum number of bits required to store an unsigned integer
static unsigned __int8 MinBitsFB(__int32 iFixedVal); // Returns the minimum number of bits required to store a 16.16 fixed point number
static unsigned __int8 MinBitsFB(double dVal); // Returns the minimum number of bits required to store a 16.16 fixed point number
// ----- Color Structures -----
void WriteRGB(unsigned __int8 iRed, unsigned __int8 iGreen, unsigned __int8 iBlue);
void WriteRGBA(unsigned __int8 iRed, unsigned __int8 iGreen, unsigned __int8 iBlue, unsigned __int8 iAlpha);
void WriteRECT(__int32 xMin, __int32 yMin, __int32 xMax, __int32 yMax);
};
Render Sharper Images
Enhance Existing Anti-aliasing
Graphs and Graphical Information
UForms Rendering Formats
UForms Component-oriented Schema
Please contact Universal Objects if you are interested in Licensing the UForms source code:
|