QString AMOldDetectorInfoSet::dbReadActiveDetectorInfos() { QString rv = "activeDetectorInfosVersion1.0"; for(int x = 0; x < count(); x++){ if(isActiveAt(x)) rv.append(",true"); else rv.append(",false"); } return rv; }
void fj::Image::drawCircle(const unsigned int x, const unsigned int y, const int radius, const fj::NormalizedColor& color) { // 中心が(x, y)で一辺が2*radiusの正方形の内部にあるピクセルを走査し、円の内部であればcolorで塗る for (int i = -radius; i < radius; i++){ for (int j = -radius; j < radius; j++) { const int kX = x + i; const int kY = y + j; if (isActiveAt(kX, kY)) { const unsigned int kDistance = std::sqrt( std::pow(i, 2) + std::pow(j, 2)); if (kDistance < radius) { setAt(kX, kY, color); } } } } }