nim book v2, Chapter 3. Rendering Textmore than just putPixel: it also offers a minimal drawText proc, to put letters and words on the screen. Its declaration looks like this: proc drawText(x, y: int; text: string; size: int; color: Color) this: drawText 30, 40, "Welcome to Nim!", 10, Yellow Notice that we didn’t use the parentheses after the name of the function to enclose the list of arguments. This is equivalent to drawText(10, 3: let texttodraw = "welcome to nim for the " & $i & "th time!" drawtext 10, i*10, texttodraw, 8, Yellow ② ① Creates a string (concatenated from three separate strings)0 码力 | 6 页 | 74.05 KB | 1 年前3
ffmpeg翻译文档字符"[],;",它们被用于滤镜链图的描述 实际上,当你在shell命令行上描述滤镜链图时还可能遇见第三层的转义(处理shell中需要转义的字符) 例如下面的字符需要嵌入 drawtext 滤镜描述的 text 值 1. this is a 'string': may contain one, or more, special characters 这个字符串包含 'string':: may contain one, or more, special characters 当嵌入滤镜描述时发生第二层的转义,为了转义所有的滤镜链图特殊字符,需要按下例处理: 1. drawtext=text=this is a \\'string\\'':: may contain one\, or more\, special characters (注意对于\ '转义中的每个特殊字符都需要再次转义,就成了\\') 最终当在shell命令行中写这个滤镜链图时再次转义。例如需要对每个特殊字符和转义处理的 \ 等进行转义,最终为: 1. -vf "drawtext=text=this is a \\\\\'string\\\\''\\:: may contain one\,, or more\,, special characters"0 码力 | 502 页 | 3.06 MB | 2 年前3
ffmpeg基本杂谈_20171116
【libavresample】 • 【libswscale】 • 【libswresample】 通用库 编解码 文件格式 同步、时间计算的简单算法 filter (FileIO、FPS、DrawText 硬件采集、加速、显示 音视频封转编解码格式预设等 原始视频格式转换 原始音频格式转码 doc libavcodec libavdevice libavfilter libavformat0 码力 | 55 页 | 20.91 MB | 2 年前3
A Case-study in Rewriting a Legacy GUI Library for Real-time Audio Software in Modern C++GetProperty()); DrawBox(GetBounds(), GetProperty ## Not invented()); DrawText(GetBounds(), kCentered, GetProperty ()); 0 码力 | 138 页 | 2.75 MB | 1 年前3
TypeScript Handbook(中文版)
getSomeArray(); 相似的, 解构可以用在函数的参数声明中: function drawText({ text = "", location: [x, y] = [0, 0], bold = false, // 画出文本 } // 以一个对象字面量为参数调用 drawText var item = { text: "someText", location: location: [1, 2, 3], style: "italics" drawText(item); ## 赋值 TypeScript Handbook(中文版) 解构也可以被用于普通的赋值表达式. 举例来讲, 交换两个变量的值可以被写作一个解构赋值: var x = 1; var y = 2; [x, y] = [y, x]; ## namespace (命名空间) 关键字0 码力 | 557 页 | 7.48 MB | 2 年前3
TypeScript 4.0 使用手册
getSomeArray(); 相似的,解构可以用在函数的参数声明中: function drawText({ text = "", location: [x, y] = [0, 0], bold = false }) { // 画出文本 } // 以一个对象字面量为参数调用 drawText var item = { text: "someText", location: location: [1, 2, 3], style: "italics" }; drawText(item); ## 赋值 解构也可以被用于普通的赋值表达式.举例来讲,交换两个变量的值可以被写作一个解构赋值: 1. var x = 1; 2. var y = 2; 3. [x, y] = [y, x]; 过去 TypeScript 中 module 关键字既可以定义 “内部模块”,也可以定义0 码力 | 683 页 | 6.27 MB | 2 年前3
《深入浅出MFC》2/eCRect rect(10,10,200,30); CDC* pDC = new CClientDC(this); str.Format("%010d", lCount); pDC->DrawText(str, &rect, DT_LEFT | DT_TOP); } 4. 在HELLO.CPP 中定义CMyFrameWnd::IdleTimeHandler 函数如下: 为了输出lCount,我又动用了三个MFC strMessage.LoadString(CG_IDS_DIDYOUKNOW); #0207 rect.left += bmpInfo.bmWidth; #0208 dc.DrawText(strMessage, rect, DT_VCENTER | DT_SINGLELINE); #0209 #0210 // Do not call CDialog::OnPaint()0 码力 | 1009 页 | 11.08 MB | 2 年前3
共 7 条
- 1













