通过汉字点阵信息,把汉字绘出到bmp中,请教!

lixiaosan 2004-06-16 04:01:20
16×16的汉字
...全文
210 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
joannie 2004-06-18
  • 打赏
  • 举报
回复
那边我贴不了,超过3个了,我不能再发了,只能贴在这
lixiaosan 2004-06-17
  • 打赏
  • 举报
回复
to lambochan(打杂) :
怎么写?
lambochan 2004-06-17
  • 打赏
  • 举报
回复
不如直接在bmp上写汉字
lixiaosan 2004-06-17
  • 打赏
  • 举报
回复
to bluebohe(薄荷) :
老大,能给个例子么
airforcetwo@163.com
lixiaosan 2004-06-17
  • 打赏
  • 举报
回复
to zfive5(醉马Ⅴ) 。。
我是说用程序写出来。还是谢谢你的回答,你还有好办法么。
醉马不肖 2004-06-17
  • 打赏
  • 举报
回复
http://www.laogu.com/download/
醉马不肖 2004-06-17
  • 打赏
  • 举报
回复
汉字字库的点阵提取程序

程序类型:解密与注册码 程序演示:

上传时间:2000-12-7 4:06:00 下载次数:30865 次

文件大小: 200 K 字节

下载地址:
/download/ziku.zip


软件简介:

本程序可以从汉字字库中提取汉字的点阵,是一个编写液晶显示汉字的好帮手
醉马不肖 2004-06-17
  • 打赏
  • 举报
回复
汉字繁体,简体16点阵字库提取程序v1.0

程序类型:另类其它 程序演示:

上传时间:2002-8-19 3:26:00 下载次数:8096 次

文件大小: 300 K 字节

下载地址:
http://www.laogu.com/download/hzdotreader.zip


软件简介:

汉字繁体,简体16点阵字库提取程序
lixiaosan 2004-06-17
  • 打赏
  • 举报
回复
to joannie(万万):
你的代码我看不懂啊。。能不能帮我看下一个问题。
http://community.csdn.net/Expert/TopicView.asp?id=3100994
joannie 2004-06-17
  • 打赏
  • 举报
回复
CView中的部分程序,你试试看,应该可以
void CView::CreatePageEMF(LPCTSTR lpFileName, LPCTSTR lpDescription)
{
int iWidthMM, iHeightMM, iWidthPels, iHeightPels, iMMPerPelX, iMMPerPelY;
float ratio = 100.0f;
float inch = 25.4f;
int paper_width =(int) (11.0f*inch*ratio);
int paper_height=(int) (8.5f*inch*ratio);

CRect rect;

CPaintDC ScreenDC(this);
iWidthMM=ScreenDC.GetDeviceCaps(HORZSIZE);
iHeightMM=ScreenDC.GetDeviceCaps(VERTSIZE);
iWidthPels=ScreenDC.GetDeviceCaps(HORZRES);
iHeightPels=ScreenDC.GetDeviceCaps(VERTRES);
iMMPerPelX=(iWidthMM*100)/iWidthPels;
iMMPerPelY=(iHeightMM*100)/iHeightPels;


rect.left=0;
rect.top=0;
rect.right=(int)paper_width;
rect.bottom=(int)paper_height;
ScreenDC.SetMapMode(MM_HIMETRIC);

if(m_pPageEMF!=NULL)
{
delete m_pPageEMF;
m_pPageEMF=NULL;
}

if(m_pPageEMF==NULL)
{
m_pPageEMF=new CMetaFileDC();

if(m_pPageEMF==NULL)
{
MessageBox("不能创建文件。\n函数退出","退出", MB_OK);
return;
}
}
if(!m_pPageEMF->CreateEnhanced(&ScreenDC, lpFileName, &rect, lpDescription))
{
MessageBox("不能创建文件。\n函数退出","退出", MB_OK);
return;
}

OnDrawPage(m_pPageEMF);
if(m_hPageEMF!=NULL)
DeleteEnhMetaFile(m_hPageEMF);
m_hPageEMF=CloseEnhMetaFile(m_pPageEMF->m_hDC);
}

void CView::OnDrawPage(CDC * pDC)
{
CRect rcCurve;
CPen pPen, pPen2, *pOldPen;;
CFont font0,font1,font2, font3;
CFont *oldFont;
CRect textRect;
float ratio = 100.0f;
float inch = 25.4f;
char buf[100];

int paper_width =(int)(11.0*inch*ratio);
int paper_height= (int)(8.5*inch*ratio);

int left_margin = (int)(.75*inch*ratio);
int right_margin= (int)(.75*inch*ratio);
int top_margin = (int)(.75*inch*ratio);
int bottom_margin=(int)(.75*inch*ratio);

int frame_left = left_margin;
int frame_right = (int)(paper_width-right_margin);
int frame_top = -top_margin;
int frame_bottom =(int)(-(paper_height-bottom_margin));

int row_height = (int)(4.0*ratio);
int x_offset=(int)(1.0*ratio);
int y_offset=(int)(0.75*ratio);
int list_width=(int)(80*ratio);

pDC->SetMapMode(MM_HIMETRIC);

LOGFONT logFont;
logFont.lfHeight =(int)( 6*ratio);
logFont.lfWidth =(int)( 4*ratio);
logFont.lfEscapement = 0;
logFont.lfOrientation = 0;
logFont.lfWeight = 700;
logFont.lfItalic = 0;
logFont.lfUnderline = 0;
logFont.lfStrikeOut = 0;
logFont.lfCharSet = GB2312_CHARSET;
logFont.lfClipPrecision = CLIP_STROKE_PRECIS;
strcpy(logFont.lfFaceName, "宋体");

font1.CreateFontIndirect(&logFont);
oldFont = pDC->SelectObject(&font1);

CString s1("12345");
textRect.left = (long)frame_left;
textRect.top = (long)(frame_top+2.5*row_height);
textRect.right = (int)(frame_left+80*ratio);
textRect.bottom= (int)(frame_top+1*row_height);
pDC->DrawText(s1, &textRect,DT_BOTTOM);






}
bluebohe 2004-06-16
  • 打赏
  • 举报
回复
把位图BitBlt到内存DC,然后在内存DC里面根据点阵SetPixel,最后把位图替换下来保存位图
sindbad 2004-06-16
  • 打赏
  • 举报
回复
hoho
jackwuwei 2004-06-16
  • 打赏
  • 举报
回复
http://www.vckbase.com/document/viewdoc/?id=1106
lixiaosan 2004-06-16
  • 打赏
  • 举报
回复
分不够再加!
lixiaosan 2004-06-16
  • 打赏
  • 举报
回复
再顶
lixiaosan 2004-06-16
  • 打赏
  • 举报
回复

19,468

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧