HowToExpect
HowToExpect
``` long long getCurrentTimeMicro() { return std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count(); } void InnerMixtureImage(IplImage* pSrc, IplImage* pDst, int xpos, int ypos) { if (!pSrc || !pDst) return; if (pSrc->nChannels != 4 || pDst->nChannels !=...
``` BLGradient linear(BLLinearGradientValues(0, 0, 0, 360*5)); linear.addStop(0.0, BLRgba32(0xFF0000FF)); linear.addStop(0.2, BLRgba32(0xFFFFFFFF)); ctx.setFillStyle(linear); ctx.fillRect(100.0, 100.0, 20, 360); BLGradient linear1(BLLinearGradientValues(0, 0, 0, 360)); linear1.addStop(0.0, BLRgba32(0xFF0000FF)); linear1.addStop(1.0, BLRgba32(0xFFFFFFFF)); ctx.setFillStyle(linear1); ctx.fillRect(200.0, 100.0, 20, 360); std::vector...
`int main() { string strText = "ABCDEEG"; int w = 200; int h = 50; int fontSize = 24; BLFontFace face; face.createFromFile("SourceHanSansSC-Regular.otf"); BLFont font; font.createFromFace(face, fontSize); BLFontMetrics fm = font.metrics();...
Under Linux, there will be a time synchronization operation. The current time is March 12, 2022. If set to March 1, 2022, wait_time will not return.
[Blend2D] ASSERTION FAILURE: 'mCtx.aheadGlyphCount >= inputGlyphCount + lookaheadGlyphCount' at 'F:\build\blend2d\src\blend2d\opentype\otlayout.cpp' [line 1393] `struct Painter { BLContext ctx; }; void drawText(Painter* painter, BLFont& font, const std::string& text, int x, int y)...
`BLImage img(480, 480, BL_FORMAT_PRGB32); BLContext ctx(img); ctx.clearAll(); // First shape filled with a radial gradient. // By default, SRC_OVER composition is used. BLGradient radial( BLRadialGradientValues(180, 180, 180, 180, 180)); radial.addStop(0.0,...
When the alpha of the background image is 0, the RGB value of the foreground image will be 0 during fusion
`BLFontFace fontFace; fontFace.createFromFile("SourceHanSansSC-Medium.otf"); BLFont font; font.createFromFace(fontFace, 28); std::string str = "Config"; BLGlyphBuffer gb; gb.setUtf8Text(str.c_str()); size_t size1 = gb.size(); font.shape(gb); size_t size2 = gb.size(); // size1 = 6; size2 = 5...