//============================================================================== 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); } }
void display_requestBlank() { doBlank = true; } void display_update(s_monitorData* monitorData) { if(doBlank) { display_setMode(DISPLAY_MODE_BLANK); lcd_setAddrWindow(0, 0, LCD_WIDTH - 1, LCD_HEIGHT - 1); doBlank = false; } // Only redraw if something changed static byte lastHistory = 255; if(!forceRedraw && lastHistory == monitorData->netHistoryIdx) return; lastHistory = monitorData->netHistoryIdx; forceRedraw = false; #if CFG_FPS millis_t frameStart = millis(); #endif if(displayFunc != NULL) displayFunc(monitorData); #if CFG_FPS millis_t frameTime = millis() - frameStart;
Color::Color() { //set values for default constructor setType("null"); setColour(Scalar(0,0,0)); }
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 ); } }
// 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); } } } } }
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); } }
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)); } }
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); } }
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); } }
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; }
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); } }
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); }
void AttributedString::append (const String& textToAppend, const Colour& colour) { const int oldLength = text.length(); const int newLength = textToAppend.length(); text += textToAppend; setColour (Range<int> (oldLength, oldLength + newLength), colour); }
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; }
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); }
void CCModelBase::setColourAlpha(const float inAlpha) { if( colour == NULL ) { colour = new CCColour(); } colour->alpha = inAlpha; setColour( *colour ); }
void ColourButton::chooseColour() { QColor chosenColour = QColorDialog::getColor(m_colour, this, m_name, QColorDialog::ShowAlphaChannel); if (chosenColour.isValid()) { setColour(chosenColour); emit colourChosen(chosenColour); } }
void ProcessorList::changeListenerCallback(ChangeBroadcaster* source) { ColourSelector* cs = dynamic_cast <ColourSelector*>(source); setColour(currentColor, cs->getCurrentColour()); repaint(); }
/** * @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); }
BuilderQueue::VertexElement::VertexElement( const Vector3 & vPos, const Vector3 & vNorm, const ColourValue & cColour, const Vector2 & vTexCoord ) : position(vPos), normal(vNorm), texcoord(vTexCoord) { setColour(cColour); }
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); }
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)); }
Label::Label (const String& name, const String& labelText) : Component (name), textValue (labelText), lastTextValue (labelText), font (15.0f), justification (Justification::centredLeft), border (1, 5, 1, 5), minimumHorizontalScale (0.7f), editSingleClick (false), editDoubleClick (false), lossOfFocusDiscardsChanges (false) { setColour (TextEditor::textColourId, Colours::black); setColour (TextEditor::backgroundColourId, Colours::transparentBlack); setColour (TextEditor::outlineColourId, Colours::transparentBlack); textValue.addListener (this); }
void NCCALogger::Impl::writeTimeStamp() { setColour(m_colour); if(m_timeStamp==true) { m_output<<currentTime()<<" "; } }
void processNormalKeys(unsigned char key, int x, int y) { if (key == 27) //Escape Character exit(0); if (key == 'c' || key == 'C') //regen colours setColour(); if (key == 'h' || key == 'H') //reset back to original colours resetColour(); glutPostRedisplay(); }
void ColourButton::buttonClicked( void ) { QColor C = QColorDialog::getColor( mColour, 0, QString(), QColorDialog::ShowAlphaChannel ); if( C.isValid() ) { setColour( C ); } }
void CodeFileListComponent::filesDropped (const juce::StringArray& incomingFiles, const int, const int) { codeFiles.addFiles (incomingFiles); fileListBox.updateContent(); setColour (juce::ListBox::outlineColourId, juce::Colours::white.withAlpha (0.5f)); grabKeyboardFocus(); }
void OpenGLHelpers::fillRectWithColour (const Rectangle<int>& rect, const Colour& colour) { glEnableClientState (GL_VERTEX_ARRAY); glDisableClientState (GL_TEXTURE_COORD_ARRAY); glDisableClientState (GL_COLOR_ARRAY); glDisableClientState (GL_NORMAL_ARRAY); setColour (colour); fillRect (rect); }
AlertTextComp (const String& message, const Font& font) { setReadOnly (true); setMultiLine (true, true); setCaretVisible (false); setScrollbarsShown (true); lookAndFeelChanged(); setWantsKeyboardFocus (false); setFont (font); setText (message, false); bestWidth = 2 * (int) std::sqrt (font.getHeight() * font.getStringWidth (message)); setColour (TextEditor::backgroundColourId, Colours::transparentBlack); setColour (TextEditor::outlineColourId, Colours::transparentBlack); setColour (TextEditor::shadowColourId, Colours::transparentBlack); }
void IndirectFitPlotView::addBackgroundRangeSelector() { auto backRangeSelector = m_plotForm->ppPlotTop->addRangeSelector( "Background", MantidWidgets::RangeSelector::YSINGLE); backRangeSelector->setVisible(false); backRangeSelector->setColour(Qt::darkGreen); backRangeSelector->setRange(0.0, 1.0); connect(backRangeSelector, SIGNAL(minValueChanged(double)), this, SIGNAL(backgroundChanged(double))); }