Ask Your Question

Revision history [back]

click to hide/show revision 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);

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);