16 #ifndef __IMG_TileDevice__
17 #define __IMG_TileDevice__
30 class IMG_TileInterface;
45 IMG_TILE_BOTTOM_FIRST = 0,
46 IMG_TILE_RANDOM_ORDER = 1,
47 IMG_TILE_TOP_FIRST = 2,
64 static bool isSpecialFileName(
const char *
filename);
69 static bool isNullDeviceName(
const char *
filename);
82 static void registerDevice(IMG_TileDeviceCreator creator,
85 static void unregisterDevice(
const char *
label);
106 virtual const char *className()
const = 0;
113 void setVisibleRegion(
int l,
int r,
int b,
int t);
119 void setRenderSize(
int rwidth,
int rheight);
123 { myDataWindow =
w; }
132 { myRenderWindow =
w; }
137 int tile_device,
int tile_height,
142 virtual int openMulti(
145 int tile_width,
int tile_height,
148 virtual void setWhitePoint(
fpreal white);
152 virtual void checkpoint();
156 { myRenderSourceName.harden(name); }
158 {
return myRenderSourceName; }
180 virtual void writeCustomTag(
const char *tagname,
int size,
181 const char *
const *
values);
185 const char *
const *
values)
187 writeCustomTag(
IMGtagName(tag_id), size, values);
214 virtual int writeTile(
const void *
data,
215 unsigned x0,
unsigned x1,
216 unsigned y0,
unsigned y1) = 0;
224 int floats_per_sample,
228 UT_ASSERT_MSG(0,
"Should be implemented by subclass in relevant cases!");
232 virtual void flush();
234 virtual int close(
bool keep_alive=
false) = 0;
238 virtual int unsafeFlush();
250 virtual bool getNextTile(
int &xl,
int &xr,
int &yb,
int &yt,
257 virtual bool getClickedTile(
int &tx,
int &ty,
float &radius)
const;
259 virtual void resetTileRequestor();
260 virtual int getTileMode()
const;
275 int xres()
const {
return myDisplayWindow.width(); }
276 int yres()
const {
return myDisplayWindow.height(); }
299 void setResolution(
int xres,
int yres,
300 int tilewidth,
int tileheight,
301 int tile_order = IMG_TILE_BOTTOM_FIRST);
310 void mapImageToTile(
int ix,
int iy,
int &tx,
int &ty);
311 void getTileBounds(
int tx,
int ty,
312 int &xl,
int &xr,
int &yb,
int &yt);
314 bool hasDataWindow(
int full_xres,
int full_yres)
const;
322 { myRandomAccess = tile_order; }
326 { myFileCount =
count; }
336 const
UT_DimRect &dataWindow()
const {
return myDataWindow; }
344 int myTileWidth, myTileHeight;
348 IMG_TILE_ORDER myRandomAccess;
350 int myClickedTileXY[2];
351 float myClickedRadius;
352 int myFilterX, myFilterY;
353 int myTileCountX, myTileCountY;
357 IMG_TileInterface *myTiles;
const UT_DimRect & displayWindow() const
PXL_API const char * getDescription(const ColorSpace *space)
Return the description of the color space.
GT_API const UT_StringHolder filename
GLuint GLsizei const GLchar * label
void setTileOrder(IMG_TILE_ORDER tile_order)
Specify the desired tile order.
virtual float getMouseClickRadius() const
int getDataHeight() const
const UT_DimRect & renderWindow() const
void writeKnownTag(IMG_TagType tag_id, int size, const char *const *values)
virtual bool getMouseClickPosition(int &x, int &y) const
virtual void setStyleSheets(UT_StringArray &)
#define UT_ASSERT_MSG(ZZ,...)
#define SYS_DEPRECATED_REPLACE(__V__, __R__)
GLint GLsizei GLsizei height
int getTileCountY() const
virtual void terminateOnConnectionLost(bool)
virtual bool writeSamples(int nsamples, int floats_per_sample, const UT_Vector3T< int > *samples, const float *data)
void setDeviceRenderWindow(const UT_DimRect &w)
void setRenderSourceName(const char *name)
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
IMG_DataType * getDataTypes()
virtual bool isInteractive() const
GLuint const GLchar * name
GLboolean GLboolean GLboolean b
DeviceRef newDevice(DeviceType type=DeviceType::Default)
A map of string to various well defined value types.
bool isRandomAccess() const
GLenum GLsizei GLsizei GLint * values
void setFileCount(int count)
In the open method, the sub-class should set the file count.
int getTileHeight() const
virtual bool wantsHoudiniPort() const
int getTileWidth() const
Query tile width parameters.
GLubyte GLubyte GLubyte GLubyte w
const char * getRenderSourceName() const
int getTileCountX() const
IMG_ColorModel * getColorModels()