本文整理汇总了C++中setColour函数的典型用法代码示例。如果您正苦于以下问题:C++ setColour函数的具体用法?C++ setColour怎么用?C++ setColour使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setColour函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例2: setType
Color::Color()
{
//set values for default constructor
setType("null");
setColour(Scalar(0,0,0));
}
示例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 );
}
}
示例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);
}
}
}
}
}
示例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);
}
}
示例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));
}
}
示例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);
}
}
示例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);
}
}
示例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;
}
示例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);
}
}
示例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);
}
示例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;
}
示例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);
}
示例14: CCColour
void CCModelBase::setColourAlpha(const float inAlpha)
{
if( colour == NULL )
{
colour = new CCColour();
}
colour->alpha = inAlpha;
setColour( *colour );
}
示例15: setColour
void ColourButton::chooseColour()
{
QColor chosenColour = QColorDialog::getColor(m_colour, this, m_name, QColorDialog::ShowAlphaChannel);
if (chosenColour.isValid())
{
setColour(chosenColour);
emit colourChosen(chosenColour);
}
}