/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include "D3DPipeline.h"
#include "sun_java2d_d3d_D3DRenderer.h"
#include "D3DContext.h"
#include "D3DRenderer.h"
#include "D3DRenderQueue.h"
{
"D3DRenderer_doDrawLineD3D x1=%-4d y1=%-4d x2=%-4d y2=%-4d",
}
{
"D3DRenderer_DrawRect x=%-4d y=%-4d w=%-4d h=%-4d",
x, y, w, h);
}
{
"D3DRenderer_FillRect x=%-4d y=%-4d w=%-4d h=%-4d",
x, y, w, h);
}
{
"D3DRenderer_DrawPoly: d3dc, xPoints or yPoints is NULL");
return E_FAIL;
}
}
{
return E_FAIL;
}
return D3D_OK;
}
}
{
return E_FAIL;
}
}
{
"D3DRenderer_FillParallelogram "
"x=%6.2f y=%6.2f "
"dx1=%6.2f dy1=%6.2f "
"dx2=%6.2f dy2=%6.2f ",
}
{
"D3DRenderer_DrawParallelogram "
"x=%6.2f y=%6.2f "
"dx1=%6.2f dy1=%6.2f lwr1=%6.2f "
"dx2=%6.2f dy2=%6.2f lwr2=%6.2f ",
// dx,dy for line width in the "21" and "12" directions.
// calculate origin of the outer parallelogram
// Only need to generate 4 quads if the interior still
// has a hole in it (i.e. if the line width ratio was
// less than 1.0)
// Note: "TOP", "BOTTOM", "LEFT" and "RIGHT" here are
// relative to whether the dxNN variables are positive
// and negative. The math works fine regardless of
// their signs, but for conceptual simplicity the
// comments will refer to the sides as if the dxNN
// were all positive. "TOP" and "BOTTOM" segments
// are defined by the dxy21 deltas. "LEFT" and "RIGHT"
// segments are defined by the dxy12 deltas.
// Each segment includes its starting corner and comes
// to just short of the following corner. Thus, each
// corner is included just once and the only lengths
// needed are the original parallelogram delta lengths
// and the "line width deltas". The sides will cover
// the following relative territories:
//
// T T T T T R
// L R
// L R
// L R
// L R
// L B B B B B
// TOP segment, to left side of RIGHT edge
// "width" of original pgram, "height" of hor. line size
// RIGHT segment, to top of BOTTOM edge
// "width" of vert. line size , "height" of original pgram
// BOTTOM segment, from right side of LEFT edge
// "width" of original pgram, "height" of hor. line size
// LEFT segment, from bottom of TOP edge
// "width" of vert. line size , "height" of inner pgram
} else {
// The line width ratios were large enough to consume
// the entire hole in the middle of the parallelogram
// so we can just issue one large quad for the outer
// parallelogram.
}
return res;
}
{
"D3DRenderer_FillAAParallelogram "
"x=%6.2f y=%6.2f "
"dx1=%6.2f dy1=%6.2f "
"dx2=%6.2f dy2=%6.2f ",
if (pd3dDevice == NULL) {
return E_FAIL;
}
return res;
}
{
// dx,dy for line width in the "21" and "12" directions.
// parameters for "outer" parallelogram
// parameters for "inner" parallelogram
"D3DRenderer_DrawAAParallelogram "
"x=%6.2f y=%6.2f "
"dx1=%6.2f dy1=%6.2f lwr1=%6.2f "
"dx2=%6.2f dy2=%6.2f lwr2=%6.2f ",
if (pd3dDevice == NULL) {
return E_FAIL;
}
// calculate true dx,dy for line widths from the "line width ratios"
// calculate coordinates of the outer parallelogram
// Only process the inner parallelogram if the line width ratio
// did not consume the entire interior of the parallelogram
// (i.e. if the width ratio was less than 1.0)
// calculate coordinates of the inner parallelogram
} else {
// Just invoke a regular fill on the outer parallelogram
}
return res;
}
#ifndef D3D_PPL_DLL
extern "C"
{
{
}
}
}
}
}
#endif // D3D_PPL_DLL