-
大小: 39KB文件类型: .zip金币: 2下载: 1 次发布日期: 2021-06-03
- 语言: Html/CSS
- 标签: vc60 PolyBezier()
资源简介
显示汉字轮廓,是“http://www.cppblog.com/vczh/archive/2008/06/11/52949.html”的继续。自带2次(QuadraticBezier())和3次(CubicBezier())函数。

代码片段和文件信息
//DISPLAY.C
/**************************************************************************\
* display.c -- module for the window with the test font.
* Includes the window procedure and an initialization routine.
*
* store the handle to the test font in the extra bytes of this window.
*
*
* HORZ_SCROLL:used to step through UC ranges when in “all glyphs“ mode.
* VERT_SCROLL:
* scroll bar range is the total number of lines needed for all glyphs
* minus the number which may be shown in the window.
* scroll bar position is then the first line which is to be drawn.
*
*
*
\**************************************************************************/
#include
#include
#include “ttffonts.h“
/* defines for the gridding pattern in background of window */
#define GRIDCOLOR PALETTEINDEX (3)
#define TICKSPACE 10
TCHAR szMBERROR [MAX_PATH]=“MBERROR“;
TCHAR szInitString [MAX_PATH]=“InitString“;
TCHAR szAllocFailed [MAX_PATH]=“AllocFailed“;
TCHAR szResetDisplay [MAX_PATH]=“ResetDisplay“;
TCHAR szNoCMAPTable [MAX_PATH]=“NoCMAPTable“;
TCHAR szCBDataTooBig [MAX_PATH]=“CBDataTooBig“;
TCHAR szNoTable [MAX_PATH]=“NoTable“;
TCHAR szFormatNot4 [MAX_PATH]=“FormatNot4“;
TCHAR szFontDataErr [MAX_PATH]=“FontDataErr“;
TCHAR szEnumPrinterR [MAX_PATH]=“EnumPrinterR“;
/* Global variables. */
HANDLE hInst;
HWND hwndMain hwndDisplay;
int gDisplaymode;
/* global variables store the start and end codepoints for UC ranges. */
USHORT *endCount= NULL;
USHORT *startCount= NULL;
int CountUCSegments (HDC);
/* error return value from CountUCSegments */
#define SEGMENTERROR -1
HWND hwndFaceBanner;
TCHAR szHello[] = TEXT(“Hello“);
LRESULT CALLBACK DisplayWndProc(HWND hwnd UINT message WPARAM wParam LPARAM lParam);
VOID BlamGlyphs (HDC PTEXTMETRIC USHORT USHORT PRECT BOOL);
int initDisplay(HWND hwndParent)
{
WNDCLASS wc;
wc.style = CS_VREDRAW | CS_HREDRAW;
wc.lpfnWndProc = (WNDPROC)DisplayWndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInst;
wc.hIcon = LoadIcon(hInst TEXT(“ttfontsIcon“));
wc.hCursor = LoadCursor(NULL IDC_ARROW);
wc.hbrBackground = NULL;
wc.lpszMenuName = NULL;
wc.lpszClassName = TEXT(“display“);
if (!RegisterClass(&wc)) return (FALSE);
hwndDisplay = CreateMDIWindow(
TEXT(“display“)
TEXT(“Display“)
WS_CHILD | WS_CLIPSIBLINGS | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_VISIBLE |
WS_CAPTION | WS_SYSMENU | WS_THICKframe | WS_VSCROLL | WS_HSCROLL
CHILDLEFT(2)
CHILDTOP
GetSystemMetrics (SM_CXFULLSCREEN)/3 - 10
GetSystemMetrics (SM_CYFULLSCREEN)/3
hwndParent hInst 0);
/* create child window to display face name */
hwndFaceBanner = CreateWindow(
TEXT(“STATIC“) TEXT(““)
WS_CHILD | WS_VISIBLE | WS_BORDER
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2011-03-14 13:23 TtfShow\
目录 0 2011-03-14 13:34 TtfShow\Bézier Splines.files\
文件 405 2011-03-14 13:34 TtfShow\Bézier Splines.files\bezier.gif
文件 1022 2011-03-14 13:34 TtfShow\Bézier Splines.files\cubic2quad.png
文件 4873 2011-03-14 13:34 TtfShow\Bézier Splines.files\FontForge.css
文件 374 2011-03-14 13:34 TtfShow\Bézier Splines.files\quadbezier.gif
文件 687 2011-03-14 13:34 TtfShow\Bézier Splines.files\splines.gif
文件 9791 2011-03-14 13:34 TtfShow\Bézier Splines.htm
文件 30286 2011-04-18 14:35 TtfShow\display.c
文件 4875 2011-03-07 14:24 TtfShow\InfoShow.cpp
文件 1488 2011-03-07 14:20 TtfShow\InfoShow.h
文件 3597 2011-02-21 15:27 TtfShow\ReadMe.txt
目录 0 2011-03-14 13:23 TtfShow\res\
文件 1328 2011-07-04 15:03 TtfShow\Resource.h
文件 3072 2011-03-14 19:42 TtfShow\res\Thumbs.db
文件 1078 2011-02-21 15:27 TtfShow\res\TtfShow.ico
文件 399 2011-02-21 15:27 TtfShow\res\TtfShow.rc2
文件 209 2011-02-21 15:27 TtfShow\StdAfx.cpp
文件 1054 2011-02-21 15:27 TtfShow\StdAfx.h
文件 1557 2011-04-18 14:40 TtfShow\ttffonts.h
文件 2090 2011-10-01 19:37 TtfShow\TtfShow.clw
文件 2173 2011-03-01 08:27 TtfShow\TtfShow.cpp
文件 4306 2011-07-04 15:31 TtfShow\TtfShow.dsp
文件 537 2011-02-21 15:27 TtfShow\TtfShow.dsw
文件 1431 2011-03-01 08:27 TtfShow\TtfShow.h
文件 1832 2011-08-06 19:35 TtfShow\TtfShow.plg
文件 7330 2011-07-04 15:07 TtfShow\TtfShow.rc
文件 25349 2011-10-01 19:37 TtfShow\TtfShowDlg.cpp
文件 2959 2011-07-04 15:23 TtfShow\TtfShowDlg.h
- 上一篇:TIN生成程序源码ja
vasc ript - 下一篇:通用的后台管理系统html模板
评论
共有 条评论