예제 #1
0
bool CompoundBorder::isContained(const Pnt2f& p, const Real32& x, const Real32& y , const Real32& Width, const Real32& Height) const
{
	Real32 LeftIn, RightIn, BottomIn, UpperIn;
	getOuterBorder()->getInsets(LeftIn, RightIn, UpperIn, BottomIn);
    return (getInnerBorder()->isContained(p,x+LeftIn, y+UpperIn, Width-LeftIn-RightIn, Height-UpperIn-BottomIn) ||
            getOuterBorder()->isContained(p,x,y,Width,Height));
}
예제 #2
0
void CompoundBorder::activateInternalDrawConstraints(const GraphicsWeakPtr g, const Real32& x, const Real32& y , const Real32& Width, const Real32& Height) const
{
	Real32 LeftIn, RightIn, BottomIn, UpperIn;
	getOuterBorder()->getInsets(LeftIn, RightIn, UpperIn, BottomIn);
    getOuterBorder()->activateInternalDrawConstraints(g,x,y,Width,Height);
    getInnerBorder()->activateInternalDrawConstraints(g,x+LeftIn, y+UpperIn, Width-LeftIn-RightIn, Height-UpperIn-BottomIn);
}
예제 #3
0
void CompoundBorder::getInsets(Real32& Left, Real32& Right,Real32& Top,Real32& Bottom) const
{
	Real32 LeftIn, LeftIn2, RightIn, RightIn2, BottomIn, BottomIn2, UpperIn, UpperIn2;
	getOuterBorder()->getInsets(LeftIn, RightIn, UpperIn, BottomIn);
	getInnerBorder()->getInsets(LeftIn2, RightIn2,UpperIn2, BottomIn2) ;
	Left = LeftIn+LeftIn2;
	Right = RightIn+RightIn2;
	Bottom = BottomIn+BottomIn2;
	Top = UpperIn+UpperIn2;
}
예제 #4
0
void CompoundBorder::draw(const GraphicsWeakPtr g, const Real32 x, const Real32 y , const Real32 Width, const Real32 Height, const Real32 Opacity, bool Clipping) const
{

	Real32 LeftIn, RightIn, BottomIn, UpperIn;
    getOuterBorder()->getInsets(LeftIn, RightIn, UpperIn, BottomIn);
	getInnerBorder()->draw(g, x+LeftIn, y+UpperIn, Width-LeftIn-RightIn, Height-UpperIn-BottomIn, Opacity);

	getOuterBorder()->draw(g, x, y, Width, Height, Opacity);
	
}
예제 #5
0
bool WindowBorder::isContained(const Pnt2f& p, const Real32& x, const Real32& y , const Real32& Width, const Real32& Height) const
{
    Real32 LeftIn, RightIn, BottomIn, UpperIn;
    getOuterBorder()->getInsets(LeftIn, RightIn, UpperIn, BottomIn);
    if(getTitlebar() != NULL)
    {
        UpperIn += getTitlebar()->getSize().y();
    }
    return (getInnerBorder()->isContained(p,x+LeftIn, y+UpperIn, Width-LeftIn-RightIn, Height-UpperIn-BottomIn) ||
            getOuterBorder()->isContained(p,x,y,Width,Height));
}
예제 #6
0
void WindowBorder::activateInternalDrawConstraints(Graphics* const g, const Real32& x, const Real32& y , const Real32& Width, const Real32& Height) const
{
    Real32 LeftIn, RightIn, BottomIn, UpperIn;
    getOuterBorder()->getInsets(LeftIn, RightIn, UpperIn, BottomIn);
    if(getTitlebar() != NULL)
    {
        UpperIn += getTitlebar()->getSize().y();
    }
    getOuterBorder()->activateInternalDrawConstraints(g, x, y, Width, Height);
    getInnerBorder()->activateInternalDrawConstraints(g,x+LeftIn, y+UpperIn, Width-LeftIn-RightIn, Height-UpperIn-BottomIn);
}
예제 #7
0
void WindowBorder::draw(Graphics* const g, const Real32 x, const Real32 y , const Real32 Width, const Real32 Height, const Real32 Opacity, bool Clipping) const
{
    Real32 LeftIn, RightIn, BottomIn, UpperIn;
    getOuterBorder()->getInsets(LeftIn, RightIn, UpperIn, BottomIn);
    if(getTitlebar() != NULL)
    {
        UpperIn += getTitlebar()->getSize().y();
    }
    getInnerBorder()->draw(g, x+LeftIn, y+UpperIn, Width-LeftIn-RightIn, Height-UpperIn-BottomIn, Opacity);
    getOuterBorder()->draw(g, x, y, Width, Height, Opacity);

}
예제 #8
0
void WindowBorder::getInsets(Real32& Left, Real32& Right,Real32& Top,Real32& Bottom) const
{
    Real32 LeftIn, LeftIn2, RightIn, RightIn2, BottomIn, BottomIn2, UpperIn, UpperIn2;
    getOuterBorder()->getInsets(LeftIn, RightIn, UpperIn, BottomIn);
    getInnerBorder()->getInsets(LeftIn2, RightIn2,UpperIn2, BottomIn2) ;
    Left = LeftIn+LeftIn2;
    Right = RightIn+RightIn2;
    Bottom = BottomIn+BottomIn2;
    Top = UpperIn+UpperIn2;

    if(getTitlebar() != NULL)
    {
        Top += getTitlebar()->getSize().y();
    }
}