Yet More Vis API Questions... [Archive] - Quintessential Forum

PDA

View Full Version : Yet More Vis API Questions...


plover
01-19-2004, 05:00 AM
1) Calling opFunc with opBlitFromPict always seems to return 0. Is this on purpose? Is there just no meaningful reason to expect the operation to fail?

2) opComposite (and presumably other ops) apparently messes with the x0, y0, etc., parameters of the Rasters in a BlitInfo record. Is this necessary? It would be nice if a BlitInfo could be treated as a persistent object.

3) What is the meaning (if any) of calling opMakeRaster with the first coordinate pair set to anything other than (0,0)? Does it just produce a Raster of size (x1-x0, y1-y0)?

Paul
01-19-2004, 07:26 AM
1) Yes, it seems currently the return value from opBlitFromPict is meaningless. I can make it less meaningless.

2) I can agree with this. However, if I change it and your plugin counts on it, your plugin will have to check the version of the player it runs in.

3) opMakeRaster will produce a Raster of size (x1-x0, y1-y0). It just sets the x0,x1,y0,y1 params which will only have an effect on opComposite (ie: the bitmap's origin is not 0,0). Of course, you don't have set x0,x1... with opMakeRaster since you can set them at any time.

plover
01-20-2004, 04:55 AM
1) I suppose the real need is for documentation in QCDModVisuals.h of what each op returns. Which ops actually require meaningful return values is obviously your call.

On a similar note, it would probably be good to move opGetSkinMode from the "returns string" section to the "returns numeric data" section of PluginServiceOp

2) Is this different from depending on new op codes for PluginServiceOp? I.e. does the serviceFunc just return 0 on an unrecognized op?

And regarding checking the version, I had a question here.

3) I'll add this to the vis api document.