< prev index next >

src/java.desktop/windows/native/libawt/java2d/d3d/D3DVertexCacher.cpp

Print this page

        

*** 107,122 **** // fudge factors #ifdef LINE_FUDGE // Horiz/vertical #define HV_FF1 ( 0.0f) ! #define HV_FF2 ( 0.51f) // For the record: value below (or larger) is required for Intel 855, but // breaks Nvidia, ATI and Intel 965, and since the pipeline is disabled on // 855 anyway we'll use 0.51f. //#define HV_FF2 ( 0.5315f) #define HV_FF3 (-0.2f) // single pixel #define SP_FF4 ( 0.3f) // diagonal, down #define DD_FX1 (-0.1f) --- 107,123 ---- // fudge factors #ifdef LINE_FUDGE // Horiz/vertical #define HV_FF1 ( 0.0f) ! #define HV_FF2 ( 0.501f) // For the record: value below (or larger) is required for Intel 855, but // breaks Nvidia, ATI and Intel 965, and since the pipeline is disabled on // 855 anyway we'll use 0.51f. //#define HV_FF2 ( 0.5315f) #define HV_FF3 (-0.2f) + #define HV_FF4 ( 0.51f) // single pixel #define SP_FF4 ( 0.3f) // diagonal, down #define DD_FX1 (-0.1f)
*** 249,262 **** // vertical fx1 = (float)x1+HV_FF1; fx2 = fx1; if (y1 > y2) { fy1 = (float)y2+HV_FF3; ! fy2 = (float)y1+HV_FF2; } else { fy1 = (float)y1+HV_FF3; ! fy2 = (float)y2+HV_FF2; } } else { // diagonal if (x1 > x2 && y1 > y2) { // ^ --- 250,263 ---- // vertical fx1 = (float)x1+HV_FF1; fx2 = fx1; if (y1 > y2) { fy1 = (float)y2+HV_FF3; ! fy2 = (float)y1+HV_FF4; } else { fy1 = (float)y1+HV_FF3; ! fy2 = (float)y2+HV_FF4; } } else { // diagonal if (x1 > x2 && y1 > y2) { // ^
*** 445,457 **** // horiz: top left - top right ADD_LINE_XYC(fx1+HV_FF3, fy1+HV_FF1, fx2-1.0f+HV_FF2, fy1+HV_FF1,color); // horiz: bottom left - bottom right ADD_LINE_XYC(fx1+1.0f+HV_FF3, fy2+HV_FF1, fx2+HV_FF2, fy2+HV_FF1,color); // vert : top right - bottom right ! ADD_LINE_XYC(fx2+HV_FF1, fy1+HV_FF3, fx2+HV_FF1, fy2-1.0f+HV_FF2,color); // vert : top left - bottom left ! ADD_LINE_XYC(fx1+HV_FF1, fy1+1.0f+HV_FF3, fx1+HV_FF1, fy2+HV_FF2,color); } return res; } HRESULT D3DVertexCacher::FillRect(int x1, int y1, int x2, int y2) --- 446,458 ---- // horiz: top left - top right ADD_LINE_XYC(fx1+HV_FF3, fy1+HV_FF1, fx2-1.0f+HV_FF2, fy1+HV_FF1,color); // horiz: bottom left - bottom right ADD_LINE_XYC(fx1+1.0f+HV_FF3, fy2+HV_FF1, fx2+HV_FF2, fy2+HV_FF1,color); // vert : top right - bottom right ! ADD_LINE_XYC(fx2+HV_FF1, fy1+HV_FF3, fx2+HV_FF1, fy2-1.0f+HV_FF4,color); // vert : top left - bottom left ! ADD_LINE_XYC(fx1+HV_FF1, fy1+1.0f+HV_FF3, fx1+HV_FF1, fy2+HV_FF4,color); } return res; } HRESULT D3DVertexCacher::FillRect(int x1, int y1, int x2, int y2)
< prev index next >