how to set inputRate and inRect ?


in development of photoshop filter, how set inputrate , inrect ?

i want display zoomed preview image on dialog. , preview can zoomed in , out, , made center point of preview image not changed (like gause blur filter). want request image data controlling inputrate , inrect.

 

i compute centerx / centery following, means preview image's center point's coordinates in origin document.

---------------------------------------------------------------------

int centerx = (int) ((inrect.left + inrect.right) /2 * a); // double num means zoom factor;

int centery = (int)((inrect.top + inrect.bottom)/2 * a);

------------------------------------------------------------------------

 

i try keep centerx/centery constant when user press zoomin / zoomout button.

but realitic running result seems preview image moved irregularly. donot know why , how can got want ?

 

the sdk docs doesnot explain clearly. said, inputrate fixed (16.16).

i think convert double type num fixed type should :(.eg):

 

double = 12.85;

 

int hipart = (int)(a); // floor(a)

int lopart = (int) ((a - hipart) *  0x10000) );

 

fixed inputrate = (hipart << 16) + lopart;

 

is right?



More discussions in Photoshop Plugin and Companion App SDK


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support