void PeHeaderT<64>::makeValidSpecific() { setMachine(PELIB_IMAGE_FILE_MACHINE_AMD64); dword dwCharacteristics = PELIB_IMAGE_FILE_EXECUTABLE_IMAGE | PELIB_IMAGE_FILE_LARGE_ADDRESS_AWARE; setCharacteristics(dwCharacteristics); setMagic(PELIB_IMAGE_NT_OPTIONAL_HDR64_MAGIC); }
void PeHeaderT<32>::makeValidSpecific() { setMachine(PELIB_IMAGE_FILE_MACHINE_I386); dword dwCharacteristics = PELIB_IMAGE_FILE_EXECUTABLE_IMAGE | PELIB_IMAGE_FILE_32BIT_MACHINE; setCharacteristics(dwCharacteristics); setMagic(PELIB_IMAGE_NT_OPTIONAL_HDR32_MAGIC); }
WindowsTypeface (const Font& font) { HDC dc = FontDCHolder::getInstance()->loadFont (font.getTypefaceName(), font.isBold(), font.isItalic(), 0); TEXTMETRIC tm; tm.tmAscent = tm.tmHeight = 1; tm.tmDefaultChar = 0; GetTextMetrics (dc, &tm); setCharacteristics (font.getTypefaceName(), tm.tmAscent / (float) tm.tmHeight, font.isBold(), font.isItalic(), tm.tmDefaultChar); }
FunctionSeries::FunctionSeries(const InputParameters & parameters) : MutableCoefficientsFunctionInterface(this, parameters), _orders(convertOrders(getParam<std::vector<unsigned int>>("orders"))), _physical_bounds(getParam<std::vector<Real>>("physical_bounds")), _series_type_name(getParam<MooseEnum>("series_type")), _x(getParam<MooseEnum>("x")), _y(getParam<MooseEnum>("y")), _z(getParam<MooseEnum>("z")), _disc(getParam<MooseEnum>("disc")), _expansion_type(getParam<MooseEnum>("expansion_type")), _generation_type(getParam<MooseEnum>("generation_type")) { std::vector<MooseEnum> domains; std::vector<MooseEnum> types; if (_series_type_name == "Cartesian") { /* * For Cartesian series, at least one of 'x', 'y', and 'z' must be specified. * * The individual series are always stored in x, y, z order (independent of the order in which * they appear in the input file). Hence, the 'orders' and 'physical_bounds' vectors must always * be specified in x, y, z order. */ if (isParamValid("x")) { domains.push_back(FunctionalBasisInterface::_domain_options = "x"); types.push_back(_x); } if (isParamValid("y")) { domains.push_back(FunctionalBasisInterface::_domain_options = "y"); types.push_back(_y); } if (isParamValid("z")) { domains.push_back(FunctionalBasisInterface::_domain_options = "z"); types.push_back(_z); } if (types.size() == 0) mooseError("Must specify one of 'x', 'y', or 'z' for 'Cartesian' series!"); _series_type = libmesh_make_unique<Cartesian>( domains, _orders, types, name(), _expansion_type, _generation_type); } else if (_series_type_name == "CylindricalDuo") { /* * CylindricalDuo represents a disc-axial expansion, where the disc is described by a single * series, such as Zernike (as opposed to a series individually representing r and a second * series independently representing theta. For CylindricalDuo series, the series are always * stored in the axial, planar order, independent of which order the series appear in the input * file. Therefore, the _orders and _physical_bounds vectors must always appear in axial, planar * order. The first entry in _domains is interpreted as the axial direction, and the following * two as the planar. */ if (isParamValid("x")) { domains = {FunctionalBasisInterface::_domain_options = "x", FunctionalBasisInterface::_domain_options = "y", FunctionalBasisInterface::_domain_options = "z"}; types.push_back(_x); } if (isParamValid("y")) { domains = {FunctionalBasisInterface::_domain_options = "y", FunctionalBasisInterface::_domain_options = "x", FunctionalBasisInterface::_domain_options = "z"}; types.push_back(_y); } if (isParamValid("z")) { domains = {FunctionalBasisInterface::_domain_options = "z", FunctionalBasisInterface::_domain_options = "x", FunctionalBasisInterface::_domain_options = "y"}; types.push_back(_z); } if (types.size() == 0) mooseError("Must specify one of 'x', 'y', or 'z' for 'CylindricalDuo' series!"); if (types.size() > 1) mooseError("Cannot specify more than one of 'x', 'y', or 'z' for 'CylindricalDuo' series!"); types.push_back(_disc); _series_type = libmesh_make_unique<CylindricalDuo>( domains, _orders, types, name(), _expansion_type, _generation_type); } else mooseError("Unknown functional series type \"", _series_type_name, "\""); // Set the physical bounds of each of the single series if defined if (isParamValid("physical_bounds")) _series_type->setPhysicalBounds(_physical_bounds); // Resize the coefficient array as needed enforceSize(false), resize(getNumberOfTerms(), 0.0), enforceSize(true); setCharacteristics(_orders); }
void initialiseCharacteristics (const String& name, const String& style) { setCharacteristics (name, style, faceWrapper->face->ascender / (float) (faceWrapper->face->ascender - faceWrapper->face->descender), L' '); }