当前位置: 首页>>代码示例>>C++>>正文


C++ setFillColor函数代码示例

本文整理汇总了C++中setFillColor函数的典型用法代码示例。如果您正苦于以下问题:C++ setFillColor函数的具体用法?C++ setFillColor怎么用?C++ setFillColor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了setFillColor函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: MapItem

Zone::Zone(QGraphicsItem *parent) :
    MapItem(parent)
{
    // Set parameters
    width = 501;
    height = 512;
    setLineColor(QColor(Qt::white));
    setFillColor(QColor(Qt::white));
}
开发者ID:cfezequiel,项目名称:mscs-thesis,代码行数:9,代码来源:zone.cpp

示例2: initPaddle

/**
 * Instantiates paddle in bottom-middle of window.
 */
GRect initPaddle(GWindow window)
{
    GRect paddle = newGRect(((WIDTH/2)-35), 550, P_WIDTH, P_HEIGHT);
    setColor(paddle, "BLACK");
    setFillColor(paddle, "BLACK");
    setFilled(paddle, true);
    add(window, paddle);
    return paddle;
}
开发者ID:abhinavp99,项目名称:CS50-pset3,代码行数:12,代码来源:breakout.c

示例3: setRadius

Prey::Prey()
{
	setRadius(8);
	setFillColor(Color::Green);
	vX = .8;
	vY = .8;
	setPosition(5, 50);

}
开发者ID:CarsonV,项目名称:Final,代码行数:9,代码来源:Prey.cpp

示例4: ASSERT

void GraphicsContext::setFillPattern(PassRefPtr<Pattern> pattern)
{
    ASSERT(pattern);
    if (!pattern) {
        setFillColor(Color::black, ColorSpaceDeviceRGB);
        return;
    }
    m_state.fillGradient.clear();
    m_state.fillPattern = pattern;
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:10,代码来源:GraphicsContext.cpp

示例5: setFillColor

//example implementation
void Button::animation_upadate()
{
	if(!m_isEnabled)
	{
		setFillColor(m_color_disabled);
		return;
	}

	Color c = m_color_mouseOver;

	double ratio1 =  sqrt((double)m_animation) / sqrt((double)m_animationLength);
	double ratio2 = 1 - ratio1;
	setFillColor(Color( (Uint8)(c.r * ratio1 + m_color.r * ratio2),
						(Uint8)(c.g * ratio1 + m_color.g * ratio2),
						(Uint8)(c.b * ratio1 + m_color.b * ratio2),
						(Uint8)(c.a * ratio1 + m_color.a * ratio2)));
	
	updateVisuals();
}
开发者ID:Bur0k,项目名称:D45az,代码行数:20,代码来源:Button.cpp

示例6: _label

TextButton::TextButton(const std::string &text, sf::Font& font, Widget *parent)
    :Button(parent), _label(text, font, nullptr){

    _label = Label (text, font, this);

    setFillColor(sf::Color(153,204,255));
    setOutlineThickness(2);
    setOutlineColor(sf::Color(0,153,153));

}
开发者ID:kaitokidi,项目名称:JacobsHack,代码行数:10,代码来源:TextButton.cpp

示例7: ASSERT

void GraphicsContext::setFillGradient(PassRefPtr<Gradient> gradient)
{
    ASSERT(gradient);
    if (!gradient) {
        setFillColor(Color::black);
        return;
    }
    m_common->state.fillColorSpace = GradientColorSpace;
    m_common->state.fillGradient = gradient;
}
开发者ID:Katarzynasrom,项目名称:patch-hosting-for-android-x86-support,代码行数:10,代码来源:GraphicsContext.cpp

示例8: save

void GraphicsContext::drawRaisedEllipse(const FloatRect& rect, const Color& ellipseColor, const Color& shadowColor)
{
    if (paintingDisabled())
        return;

    save();

    setStrokeColor(shadowColor);
    setFillColor(shadowColor);

    drawEllipse(FloatRect(rect.x(), rect.y() + 1, rect.width(), rect.height()));

    setStrokeColor(ellipseColor);
    setFillColor(ellipseColor);

    drawEllipse(rect);  

    restore();
}
开发者ID:josedealcala,项目名称:webkit,代码行数:19,代码来源:GraphicsContext.cpp

示例9: initBricks

/**
 * Initializes window with a grid of bricks.
 */
void initBricks(GWindow window)
{
    int b_y = 40;
    for (int i = 0; i < 5; i++)
    {
        int b_x = 2;
        for (int j = 0; j < 10; j++)
        {            
            GRect bricks = newGRect(b_x, b_y, 35, 10);
            add(window, bricks);
                       
            if (i == 0)
            {
                setFillColor(bricks, "BLUE");
            } 
            else if (i == 1)
            {
                setFillColor(bricks, "BLACK");
            } 
            else if (i == 2)
            {
                setFillColor(bricks, "RED");
            } 
            else if (i == 3)
            {
                setFillColor(bricks, "YELLOW");
            } 
            else if (i == 4)
            {
                setFillColor(bricks, "GREEN");
            }         
                       
            setFilled(bricks, true);            
             
            b_x = b_x + 40;            
            
                       
        }
        b_y = b_y + 20;
        
    }
}
开发者ID:abhinavp99,项目名称:CS50-pset3,代码行数:45,代码来源:breakout.c

示例10: draw

void draw(void *userData)
{
	/* Draw rectangle */
	setPenColor(POLO_TRANSPARENT);
	setFillColor(POLO_MIDNIGHT);
	drawRect(0, 0, 120, 44);
	
	/* Draw hello world */
	setPenColor(POLO_WHITE);
	drawText(10, 10, "Hello world");
}
开发者ID:liam-middlebrook,项目名称:libpolo,代码行数:11,代码来源:demo_helloworld.c

示例11: setFrameColor

//-----------------------------------------------------------------------------
void CDrawContext::init ()
{
	// set the default values
	setFrameColor (kWhiteCColor);
	setLineStyle (kLineSolid);
	setLineWidth (1);
	setFillColor (kBlackCColor);
	setFontColor (kWhiteCColor);
	setFont (kSystemFont);
	setDrawMode (kAliasing);
	setClipRect (surfaceRect);
}
开发者ID:sa-tsuklog,项目名称:MyLib,代码行数:13,代码来源:cdrawcontext.cpp

示例12: color

//-----------------------------------------------------------------------------
void D2DDrawContext::setGlobalAlpha (float newAlpha)
{
    if (currentState.globalAlpha == newAlpha)
        return;
    COffscreenContext::setGlobalAlpha (newAlpha);
    CColor color (currentState.frameColor);
    currentState.frameColor = kTransparentCColor;
    setFrameColor (color);
    color = currentState.fillColor;
    currentState.fillColor = kTransparentCColor;
    setFillColor (color);
    color = currentState.fontColor;
    currentState.fontColor = kTransparentCColor;
    setFontColor (color);
}
开发者ID:kchikamura,项目名称:vstplugin,代码行数:16,代码来源:d2ddrawcontext.cpp

示例13: setIsDrag

bool CircleObject::init()
{
	setIsDrag(false);
	setObjectType(ObjectType::CIRCLE_OBJECT);
	setTypeName("CircleObject");
	m_drawnode = CCDrawNode::create();
	addChild(m_drawnode);

	registerWithTouchDispatcher();

	setBorderColor(ccc4f(1, 0, 0, 1));
	setFillColor(ccc4f(0.5, 0.5, 0.5, 0.5));
	m_radius = 10;
	return true;
}
开发者ID:cubemoon,项目名称:SceneEditor-1,代码行数:15,代码来源:CircleObject.cpp

示例14: fillRule

void GraphicsContext::fillRectWithRoundedHole(const IntRect& rect, const FloatRoundedRect& roundedHoleRect, const Color& color)
{
    if (paintingDisabled())
        return;

    Path path;
    path.addRect(rect);

    if (!roundedHoleRect.radii().isZero())
        path.addRoundedRect(roundedHoleRect);
    else
        path.addRect(roundedHoleRect.rect());

    WindRule oldFillRule = fillRule();
    Color oldFillColor = fillColor();
    
    setFillRule(RULE_EVENODD);
    setFillColor(color);

    fillPath(path);
    
    setFillRule(oldFillRule);
    setFillColor(oldFillColor);
}
开发者ID:josedealcala,项目名称:webkit,代码行数:24,代码来源:GraphicsContext.cpp

示例15: DrawSolidCircle

void MyDebugDraw::DrawSolidCircle(const b2Vec2& center, float32 radius, const b2Vec2& axis, const b2Color& color)
{
    auto circle = sf::CircleShape(radius);
    circle.setPosition(center.x - radius, center.y - radius);
    circle.setFillColor(B2SFColor(color));
    this->m_window->draw(circle);

    // line of the circle wich shows the angle
    b2Vec2 p = center + (radius * axis);
    sf::VertexArray lines(sf::Lines, 2);
    lines[0].color = sf::Color(0,0,0);
    lines[0].position = sf::Vector2f(center.x, center.y);
    lines[1].position = sf::Vector2f(p.x, p.y);
    this->m_window->draw(lines);
}
开发者ID:EmileSonneveld,项目名称:SpaceGame,代码行数:15,代码来源:DebugDraw.cpp


注:本文中的setFillColor函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。