本文整理汇总了C++中setColour函数的典型用法代码示例。如果您正苦于以下问题:C++ setColour函数的具体用法?C++ setColour怎么用?C++ setColour使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setColour函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: v
//==============================================================================
void DrawableText::refreshFromValueTree (const ValueTree& tree, ComponentBuilder&)
{
ValueTreeWrapper v (tree);
setComponentID (v.getID());
const RelativeParallelogram newBounds (v.getBoundingBox());
const RelativeCoordinate newFontHeight (v.getFontHeight());
const RelativeCoordinate newFontHScale (v.getFontHorizontalScale());
const Colour newColour (v.getColour());
const Justification newJustification (v.getJustification());
const String newText (v.getText());
const Font newFont (v.getFont());
if (text != newText || font != newFont || justification != newJustification
|| colour != newColour || bounds != newBounds
|| newFontHeight != fontHeight || newFontHScale != fontHScale)
{
setBoundingBox (newBounds);
setFontHeight (newFontHeight);
setFontHorizontalScale (newFontHScale);
setColour (newColour);
setFont (newFont, false);
setJustification (newJustification);
setText (newText);
}
}
开发者ID:AGenews,项目名称:GUI,代码行数:27,代码来源:juce_DrawableText.cpp
示例2: setType
Color::Color()
{
//set values for default constructor
setType("null");
setColour(Scalar(0,0,0));
}
开发者ID:hagerrady13,项目名称:TrafficSystem,代码行数:7,代码来源:Color.cpp
示例3: translate
void CCModelText::setText(const char *text, const float height, const char *font)
{
if( primitive == NULL )
{
translate( 0.0f, 0.0f, CC_SMALLFLOAT );
setColour( CCColour( 0.0f ) );
primitive = new CCPrimitiveText( text );
addPrimitive( primitive );
}
else
{
primitive->setup( text );
}
if( height != -1.0f )
{
setHeight( height );
}
if( font == NULL )
{
setFont( "HelveticaNeueLight" );
}
else
{
setFont( font );
}
}
开发者ID:playir,项目名称:SocialPoetry,代码行数:28,代码来源:CCModelText.cpp
示例4: task
// just writes the task id to the screen over and over
void task(int id) {
struct RastPort rp1;
struct BitMap bm1;
uint32_t col = colours[id];
dprintf("task %08x colour %06x sp =~ %08x\n", id, col, &rp1+1);
rp1 = *rp;
bm1 = *rp->drawable.bitmap;
rp1.drawable.bitmap = &bm1;
while (1) {
int c;
for (c=0;c<2;c++) {
int y, x;
int yt = id*196, yb = yt + 128;
int colour = c ? col : ~col;
setColour(&rp1, colour);
for (y=yt;y<yb;y+=1) {
for (x=0;x<WIDTH;x+=1) {
moveTo(&rp1, x, y);
drawRect(&rp1, 1, 1);
}
}
}
}
}
开发者ID:corywalker,项目名称:puppybits,代码行数:31,代码来源:irq-timer.c
示例5: turn
void turn(int tpm, char win[], char j1[], char j2[])//
{
if(tpm==0)
{
setColour(CYAN,NOIR);
printf("\n\n\n\n\t\t%s ",j1);
setColour(BLANC,NOIR);
strcpy(win,j1);
}
if(tpm==1)
{
setColour(CYAN,NOIR);
printf("\n\n\n\n\t\t%s ",j2);
setColour(BLANC,NOIR);
strcpy(win,j2);
}
}
开发者ID:percenuage,项目名称:eseo-game-of-nim,代码行数:17,代码来源:basic+game.c
示例6: setType
Marker::Marker(string name){
setType(name);
if (name == "yellow"){
setHSVmin(cv::Scalar(25, 50, 131));
setHSVmax(cv::Scalar(40, 213, 221));
setColour(cv::Scalar(230, 245, 50));
}
}
开发者ID:engkan2kit,项目名称:openCiVil,代码行数:8,代码来源:marker.cpp
示例7: setColour
void SelectorControl::notifySettingsChanged(const MyGUI::UString& _sectorName, const MyGUI::UString& _propertyName)
{
if (!mPropertyColour.empty() && _sectorName == "Settings" && _propertyName == mPropertyColour)
{
MyGUI::Colour colour = SettingsManager::getInstance().getSector("Settings")->getPropertyValue<MyGUI::Colour>(mPropertyColour);
setColour(colour);
}
}
开发者ID:ak4hige,项目名称:myway3d,代码行数:8,代码来源:SelectorControl.cpp
示例8: setColour
void SelectorControl::notifySettingsChanged(const std::string& _path)
{
if (!mPropertyColour.empty() && _path == ("Workspace/Colours/" + mPropertyColour))
{
MyGUI::Colour colour = SettingsManager::getInstance().getValue<MyGUI::Colour>("Workspace/Colours/" + mPropertyColour);
setColour(colour);
}
}
开发者ID:retrydev,项目名称:MMO-Framework,代码行数:8,代码来源:SelectorControl.cpp
示例9: warning
int warning(int matchesRemaining)//
{
int matchesPlayed;
setColour(VERT,NOIR);
scanf("%d",&matchesPlayed);
purger();
setColour(BLANC,NOIR);
while(matchesRemaining<=matchesPlayed || matchesPlayed>3 || matchesPlayed<=0)
{
printf("\n\tError Try Again : ");
setColour(VERT,NOIR);
scanf("%d",&matchesPlayed);
purger();
setColour(BLANC,NOIR);
}
return matchesPlayed;
}
开发者ID:percenuage,项目名称:eseo-game-of-nim,代码行数:17,代码来源:basic+game.c
示例10: setColour
void TextureToolControl::notifySettingsChanged(const std::string& _path)
{
if (_path == "Workspace/Colours/ColourBackground")
{
MyGUI::Colour colour = SettingsManager::getInstance().getValue<MyGUI::Colour>("Workspace/Colours/ColourBackground");
setColour(colour);
}
}
开发者ID:JohnCrash,项目名称:mygui,代码行数:8,代码来源:TextureToolControl.cpp
示例11: setColour
void AttributedString::setColour (const Colour& colour)
{
for (int i = attributes.size(); --i >= 0;)
if (attributes.getUnchecked(i)->getColour() != nullptr)
attributes.remove (i);
setColour (Range<int> (0, text.length()), colour);
}
开发者ID:Emisense,项目名称:S3Test,代码行数:8,代码来源:juce_AttributedString.cpp
示例12: qWarning
bool QLCChannel::loadXML(const QDomElement& root)
{
if (root.tagName() != KXMLQLCChannel)
{
qWarning() << "Channel node not found.";
return false;
}
/* Get channel name */
QString str = root.attribute(KXMLQLCChannelName);
if (str.isEmpty() == true)
return false;
setName(str);
/* Subtags */
QDomNode node = root.firstChild();
while (node.isNull() == false)
{
QDomElement tag = node.toElement();
if (tag.tagName() == KXMLQLCCapability)
{
/* Create a new capability and attempt to load it */
QLCCapability* cap = new QLCCapability();
if (cap->loadXML(tag) == true)
{
/* Loading succeeded */
if (addCapability(cap) == false)
{
/* Value overlaps with existing value */
delete cap;
}
}
else
{
/* Loading failed */
delete cap;
}
}
else if (tag.tagName() == KXMLQLCChannelGroup)
{
str = tag.attribute(KXMLQLCChannelGroupByte);
setControlByte(ControlByte(str.toInt()));
setGroup(stringToGroup(tag.text()));
}
else if (tag.tagName() == KXMLQLCChannelColour)
{
setColour(stringToColour(tag.text()));
}
else
{
qWarning() << Q_FUNC_INFO << "Unknown Channel tag: " << tag.tagName();
}
node = node.nextSibling();
}
return true;
}
开发者ID:Boudewijn26,项目名称:qlcplus,代码行数:58,代码来源:qlcchannel.cpp
示例13: chooseLevel
void chooseLevel(Player *joueur)
{
DEFAUT;
clrScr();
setColour(JAUNE_VIF,NOIR);
gotoXY(38,3);
printf("%c %c%c %c %c %c%c %c %c %c",219,219,219,219,219,219,219,219,219,219);
setColour(BLEU_VIF,NOIR);
gotoXY(38,4);
printf("%c %c%c %c %c %c%c %c %c %c%c%c",219,219,254,219,219,219,254,219,219,219,254,219);
setColour(ROUGE_VIF,NOIR);
gotoXY(38,5);
printf("%c%c %c%c %c %c%c %c%c %c %c %c",219,219,219,219,219,219,219,219,219,219,219,219);
gotoXY(5,10);
setColour(MAGENTA_VIF,NOIR);
puts("EASY (1)");
RabbitHead(16,5);
gotoXY(5,20);
setColour(BLEU_VIF,NOIR);
puts("MEDIUM (2)");
GeekHead(16,15);
gotoXY(5,30);
setColour(ROUGE_VIF,NOIR);
puts("HARD (3)");
RedDogHead(16,25);
gotoXY(79,10);
setColour(BLANC_VIF,NOIR);
puts("APOCALYPTIC (4)");
MastersHead(58,11);
gotoXY(39,22);
printf("Which level ? : ");
scanf("%d",&joueur->level);
}
开发者ID:percenuage,项目名称:eseo-mastermind,代码行数:33,代码来源:player.c
示例14: CCColour
void CCModelBase::setColourAlpha(const float inAlpha)
{
if( colour == NULL )
{
colour = new CCColour();
}
colour->alpha = inAlpha;
setColour( *colour );
}
开发者ID:Orange-OpenSource,项目名称:2c,代码行数:9,代码来源:CCModelBase.cpp
示例15: setColour
void ColourButton::chooseColour()
{
QColor chosenColour = QColorDialog::getColor(m_colour, this, m_name, QColorDialog::ShowAlphaChannel);
if (chosenColour.isValid())
{
setColour(chosenColour);
emit colourChosen(chosenColour);
}
}
开发者ID:doerlbh,项目名称:Bandage,代码行数:9,代码来源:colourbutton.cpp
示例16: setColour
void ProcessorList::changeListenerCallback(ChangeBroadcaster* source)
{
ColourSelector* cs = dynamic_cast <ColourSelector*>(source);
setColour(currentColor, cs->getCurrentColour());
repaint();
}
开发者ID:ArmandNM,项目名称:GUI,代码行数:9,代码来源:ProcessorList.cpp
示例17: QString
/**
* @brief Display in the residuals panel the line at Y=0.
*/
void DisplayCurveFit::addResidualsZeroline() {
if (m_uiForm.residualsPlot->hasRangeSelector(QString("zeroLine"))) {
return; // do nothing
}
auto residualsZeroline = m_uiForm.residualsPlot->addRangeSelector(
QString("zeroLine"), RangeSelector::YSINGLE);
residualsZeroline->setColour(QColor(Qt::darkGreen));
residualsZeroline->setMinimum(0.0);
}
开发者ID:rosswhitfield,项目名称:mantid,代码行数:12,代码来源:DisplayCurveFit.cpp
示例18: position
BuilderQueue::VertexElement::VertexElement(
const Vector3 & vPos,
const Vector3 & vNorm,
const ColourValue & cColour,
const Vector2 & vTexCoord
) : position(vPos), normal(vNorm), texcoord(vTexCoord)
{
setColour(cColour);
}
开发者ID:thejasonfisher,项目名称:OhTSM,代码行数:9,代码来源:HardwareIsoVertexShadow.cpp
示例19: setThickness
LineSegment::LineSegment(const sf::Vector2f& start, const sf::Vector2f& end, float thickness, sf::Color colour)
: m_texture (nullptr),
m_vertexArray (sf::Quads, 4u),
m_startPoint (start),
m_endPoint (end)
{
setThickness(thickness);
setColour(colour);
}
开发者ID:fallahn,项目名称:CHUF,代码行数:9,代码来源:LineSegment.cpp
示例20: Slider
SynthSlider::SynthSlider(String name) : Slider(name), bipolar_(false), active_(true),
string_lookup_(nullptr), parent_(nullptr) {
mopo::ValueDetails details = mopo::Parameters::getDetails(name.toStdString());
if (details.steps)
setRange(details.min, details.max, (details.max - details.min) / (details.steps - 1));
else
setRange(details.min, details.max);
post_multiply_ = details.display_multiply;
scaling_type_ = details.display_skew;
units_ = details.display_units;
setDoubleClickReturnValue(true, details.default_value);
setTextBoxStyle(Slider::NoTextBox, true, 0, 0);
setBufferedToImage(true);
setColour(Slider::backgroundColourId, Colour(0xff303030));
setColour(Slider::textBoxOutlineColourId, Colour(0x00000000));
}
开发者ID:hztirf,项目名称:helm,代码行数:18,代码来源:synth_slider.cpp
注:本文中的setColour函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论