Ejemplo n.º 1
0
void
ImfHeaderSetDataWindow (ImfHeader *hdr,
			int xMin, int yMin,
			int xMax, int yMax)
{
    header(hdr)->dataWindow() = Box2i (V2i (xMin, yMin), V2i (xMax, yMax));
}
Ejemplo n.º 2
0
int
ImfHeaderSetBox2iAttribute (ImfHeader *hdr,
			    const char name[],
			    int xMin, int yMin,
			    int xMax, int yMax)
{
    try
    {
	Box2i box (V2i (xMin, yMin), V2i (xMax, yMax));

	if (header(hdr)->find(name) == header(hdr)->end())
	{
	    header(hdr)->insert (name, Imf::Box2iAttribute (box));
	}
	else
	{
	    header(hdr)->typedAttribute<Imf::Box2iAttribute>(name).value() =
		box;
	}

	return 1;
    }
    catch (const std::exception &e)
    {
	setErrorMessage (e);
	return 0;
    }
}
Ejemplo n.º 3
0
Header::Header (int width,
                int height,
                float pixelAspectRatio,
                const V2f &screenWindowCenter,
                float screenWindowWidth,
                LineOrder lineOrder,
                Compression compression)
    :
    _map()
{
    staticInitialize();

    Box2i displayWindow (V2i (0, 0), V2i (width - 1, height - 1));

    initialize (*this,
                displayWindow,
                displayWindow,
                pixelAspectRatio,
                screenWindowCenter,
                screenWindowWidth,
                lineOrder,
                compression);
}