neuray Services API Programmer's Manual

icanvas.h File Reference

Description

canvas data type

Code Example

icanvas.h

‎/******************************************************************************
 * Copyright 2010-2020 MIGENIUS PTY LTD, Australia. All rights reserved.
 *
 * Portions Copyright 1986-2011 by mental images GmbH, Fasanenstr. 81,
 * D-10623 Berlin, Germany. All rights reserved.
 *****************************************************************************/
//*****************************************************************************
#ifndef MI_NSERVICES_ICANVAS_H
#define MI_NSERVICES_ICANVAS_H

#include <mi/neuraylib/idata.h>
#include <mi/neuraylib/icanvas.h>

namespace mi {
    namespace nservices {



enum Scaling_mode  
{
    SCALING_MODE_NEAREST_NEIGHBOR = 0,
    SCALING_MODE_LINEAR = 1,
    SCALING_MODE_CUBIC = 2,
    //  Undocumented, for alignment only.
    SCALING_MODE_FORCE_32_BIT = 0xffffffffU
};
class ICanvas : public
    mi::base::Interface_declare<0x7D2C4D39,0x0F54,0x212A,0x26,0x7B,0x50,0xA8,0xF6,0x3B,0x76,0x4F,
    mi::IData>
{
public:
    virtual neuraylib::ICanvas * get_canvas() const = 0;

    virtual void set_canvas(
        neuraylib::ICanvas *canvas) = 0;

    virtual ICanvas *resize(Scaling_mode mode, mi::Uint32 resolution_x, mi::Uint32 resolution_y) const = 0;
    
    virtual ICanvas *crop(mi::Uint32 xl, mi::Uint32 yl, mi::Uint32 xh, mi::Uint32 yh, const char* pixel_type = nullptr) const = 0;
};
 // end group mi_nservices_types

} // namespace nservices
} // namespace mi

#endif // MI_NSERVICES_ICANVAS_H

Namespaces

namespace mi
namespace 
Namespace for the neuray Services API. More...

Classes

class 
This interface represents a canvas. More...

Enumerations

enum  {SCALING_MODE_NEAREST_NEIGHBOR = 0, SCALING_MODE_LINEAR = 1, SCALING_MODE_CUBIC = 2, SCALING_MODE_FORCE_32_BIT = 0xffffffffU }
Scaling filter mode. More...