1 | initial version |
The following code calculates the appropriate measures:
int xdist = indentRight - indentLeft; // indent as index from 0 to 256, for the above picture: indentRight: 235, indentLeft: 15
double alpha = 256.0 / xdist;
int beta = (int) (indentLeft* alpha);
2 | No.2 Revision |
The following code calculates the appropriate measures:
int xdist = indentRight - indentLeft; // indent as index from 0 to 256, for the above picture: indentRight: 235, indentLeft: 15
double alpha = 256.0 / xdist;
int beta = (int) (indentLeft* -(indentLeft* alpha);