CXTColorRef& CXTColorRef::blend(const CXTColorRef& clr, int opacity) { *this = RGB(BlendColor(clr.getRValue(), getRValue(), opacity), BlendColor(clr.getGValue(), getGValue(), opacity), BlendColor(clr.getBValue(), getBValue(), opacity)); return *this; }
CXTColorRef& CXTColorRef::subtract(const CXTColorRef& clr) { *this = RGB(addColorValue(-clr.getRValue(), getRValue()), addColorValue(-clr.getGValue(), getGValue()), addColorValue(-clr.getBValue(), getBValue())); return *this; }
void CXTColorRef::toHSB(double& h, double& s, double& b) const { int red = getRValue(); int green = getGValue(); int blue = getBValue(); int cmax = __max(red, __max(green, blue)); int cmin = __min(red, __min(green, blue)); b = ((double) cmax) / 255.0; if (cmax != 0) s = ((double) (cmax - cmin)) / ((double) cmax); else s = 0; if (s == 0) h = 0; else { double redc = ((double) (cmax - red)) / ((double) (cmax - cmin)); double greenc = ((double) (cmax - green)) / ((double) (cmax - cmin)); double bluec = ((double) (cmax - blue)) / ((double) (cmax - cmin)); if (red == cmax) h = bluec - greenc; else if (green == cmax) h = 2.0 + redc - bluec; else h = 4.0 + greenc - redc; h /= 6.0; if (h < 0) h = h + 1.0; } }
CXTColorRef& CXTColorRef::operator/=(COLORREF cr) { m_ColorRef = SafeRGB( getRValue() / GetRValue(cr), getGValue() / GetGValue(cr), getBValue() / GetBValue(cr)); return *this; }
bool Database_Config_Bible::getCheckDoubleSpacesUsfm (string bible) { // Check is on by default in the Cloud, and off on a client. #ifdef HAVE_CLIENT bool standard = false; #else bool standard = true; #endif return getBValue (bible, "double-spaces-usfm", standard); }
bool Database_Config_Bible::getCheckWellFormedUsfm (string bible) { // Check is on by default in the Cloud, and off on a client. #ifdef HAVE_CLIENT bool standard = false; #else bool standard = true; #endif return getBValue (bible, "check-well-formed-usfm", standard); }
int UCBVHaarSingleStumpLearner::getKeyOfMaximalElement() { int key; float maxVal = numeric_limits<float>::min(); map<int,FeatureDataUCBV>::iterator itUCBV; for( itUCBV = UCBVHaarSingleStumpLearner::_featuresData.begin(); itUCBV != _featuresData.end(); itUCBV++ ) { float val = getBValue( itUCBV->first ); if ( val > maxVal ) { maxVal = val; key = itUCBV->first; if ( maxVal == numeric_limits<float>::max() ) break; } } return key; }
bool Database_Config_Bible::getParatextCollaborationEnabled (string bible) { return getBValue (bible, "paratext-collaboration-enabled", false); }
bool Database_Config_Bible::getPublicFeedbackEnabled (string bible) { return getBValue (bible, "public-feedback-enabled", true); }
bool Database_Config_Bible::getExportQuickBibleDuringNight (string bible) { return getBValue (bible, "export-quickbible-during-night", false); }
bool Database_Config_Bible::getSecureOdtExport (string bible) { return getBValue (bible, "secure-odt-export", false); }
bool Database_Config_Bible::getCheckBooksVersification (string bible) { return getBValue (bible, "check-books-versification", false); }
bool Database_Config_Bible::getExportOnlineBibleDuringNight (string bible) { return getBValue (bible, "export-onlinebible-during-night", false); }
bool Database_Config_General::getIndexBibles () { return getBValue ("index-bibles", false); }
bool Database_Config_Bible::getCheckFullStopInHeadings (string bible) { return getBValue (bible, "full-stop-headings", false); }
bool Database_Config_Bible::getExportChapterDropCapsFrames (string bible) { return getBValue (bible, "export-chapter-drop-caps-frames", false); }
bool Database_Config_General::getClientMode () { return getBValue ("client-mode", false); }
bool Database_Config_Bible::getCheckMatchingPairs (string bible) { return getBValue (bible, "check-matching-pairs", false); }
bool Database_Config_Bible::getCheckPatterns (string bible) { return getBValue (bible, "check_patterns", false); }
bool Database_Config_Bible::getCheckMissingPunctuationEndVerse (string bible) { return getBValue (bible, "missing-punctuation-end-verse", false); }
bool Database_Config_Bible::getCheckSentenceStructure (string bible) { return getBValue (bible, "sentence-structure", false); }
bool Database_Config_Bible::getCheckParagraphStructure (string bible) { return getBValue (bible, "paragraph-structure", false); }
bool Database_Config_Bible::getCheckSpaceBeforePunctuation (string bible) { return getBValue (bible, "space-before-punctuation", false); }
bool Database_Config_Bible::getExportESwordDuringNight (string bible) { return getBValue (bible, "export-esword-during-night", false); }
bool Database_Config_Bible::getDateInHeader (string bible) { return getBValue (bible, "date-in-header", false); }
bool Database_Config_Bible::getCheckChaptesVersesVersification (string bible) { return getBValue (bible, "check-chapters-verses-versification", false); }
bool Database_Config_General::getJustStarted () { return getBValue ("just-started", false); }
bool Database_Config_Bible::getExportTextDuringNight (string bible) { return getBValue (bible, "export-text-during-night", false); }
bool Database_Config_General::getReadFromGit () { return getBValue ("read-from-git", false); }
bool Database_Config_Bible::getGenerateInfoDuringNight (string bible) { return getBValue (bible, "generate-info-during-night", false); }