Пример #1
0
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;
}
Пример #2
0
CXTColorRef& CXTColorRef::subtract(const CXTColorRef& clr)
{
	*this = RGB(addColorValue(-clr.getRValue(), getRValue()),
				addColorValue(-clr.getGValue(), getGValue()),
				addColorValue(-clr.getBValue(), getBValue()));
	return *this;
}
Пример #3
0
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;
	}
}
Пример #4
0
CXTColorRef& CXTColorRef::operator/=(COLORREF cr)
{
	m_ColorRef = SafeRGB(
		getRValue() / GetRValue(cr),
		getGValue() / GetGValue(cr),
		getBValue() / GetBValue(cr));
	return *this;
}
Пример #5
0
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);
}
Пример #6
0
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);
}
Пример #7
0
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;
}
Пример #8
0
bool Database_Config_Bible::getParatextCollaborationEnabled (string bible)
{
  return getBValue (bible, "paratext-collaboration-enabled", false);
}
Пример #9
0
bool Database_Config_Bible::getPublicFeedbackEnabled (string bible)
{
  return getBValue (bible, "public-feedback-enabled", true);
}
Пример #10
0
bool Database_Config_Bible::getExportQuickBibleDuringNight (string bible)
{
  return getBValue (bible, "export-quickbible-during-night", false);
}
Пример #11
0
bool Database_Config_Bible::getSecureOdtExport (string bible)
{
  return getBValue (bible, "secure-odt-export", false);
}
Пример #12
0
bool Database_Config_Bible::getCheckBooksVersification (string bible)
{
  return getBValue (bible, "check-books-versification", false);
}
Пример #13
0
bool Database_Config_Bible::getExportOnlineBibleDuringNight (string bible)
{
  return getBValue (bible, "export-onlinebible-during-night", false);
}
Пример #14
0
bool Database_Config_General::getIndexBibles ()
{
  return getBValue ("index-bibles", false);
}
Пример #15
0
bool Database_Config_Bible::getCheckFullStopInHeadings (string bible)
{
  return getBValue (bible, "full-stop-headings", false);
}
Пример #16
0
bool Database_Config_Bible::getExportChapterDropCapsFrames (string bible)
{
  return getBValue (bible, "export-chapter-drop-caps-frames", false);
}
Пример #17
0
bool Database_Config_General::getClientMode ()
{
  return getBValue ("client-mode", false);
}
Пример #18
0
bool Database_Config_Bible::getCheckMatchingPairs (string bible)
{
  return getBValue (bible, "check-matching-pairs", false);
}
Пример #19
0
bool Database_Config_Bible::getCheckPatterns (string bible)
{
  return getBValue (bible, "check_patterns", false);
}
Пример #20
0
bool Database_Config_Bible::getCheckMissingPunctuationEndVerse (string bible)
{
  return getBValue (bible, "missing-punctuation-end-verse", false);
}
Пример #21
0
bool Database_Config_Bible::getCheckSentenceStructure (string bible)
{
  return getBValue (bible, "sentence-structure", false);
}
Пример #22
0
bool Database_Config_Bible::getCheckParagraphStructure (string bible)
{
  return getBValue (bible, "paragraph-structure", false);
}
Пример #23
0
bool Database_Config_Bible::getCheckSpaceBeforePunctuation (string bible)
{
  return getBValue (bible, "space-before-punctuation", false);
}
Пример #24
0
bool Database_Config_Bible::getExportESwordDuringNight (string bible)
{
  return getBValue (bible, "export-esword-during-night", false);
}
Пример #25
0
bool Database_Config_Bible::getDateInHeader (string bible) 
{
  return getBValue (bible, "date-in-header", false);
}
Пример #26
0
bool Database_Config_Bible::getCheckChaptesVersesVersification (string bible)
{
  return getBValue (bible, "check-chapters-verses-versification", false);
}
Пример #27
0
bool Database_Config_General::getJustStarted ()
{
  return getBValue ("just-started", false);
}
Пример #28
0
bool Database_Config_Bible::getExportTextDuringNight (string bible)
{
  return getBValue (bible, "export-text-during-night", false);
}
Пример #29
0
bool Database_Config_General::getReadFromGit ()
{
  return getBValue ("read-from-git", false);
}
Пример #30
0
bool Database_Config_Bible::getGenerateInfoDuringNight (string bible)
{
  return getBValue (bible, "generate-info-during-night", false);
}