几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-05-06, 11:37 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】problem with ttf

problem with ttf
problem with ttf
i m using ver 1.14 is having problem with ttf fill,
if i straight away draw a text or mtext entity with ttf font,,,,it draws fine
as i draw any entity e.g. line, then draw another text entity it start drawing
as hollow text font instead of filled ttf font..........i had also tried
settextfill function but nothing works.......
plz hav a look on attached file...
plz help..............waiting eagerly for response
attached files
i succeeded in reproducing the problem in odamfcapp (wingdi, gs model turned off)
we'll try to fix it for next release.
sergey slezkin
last edited by mmuratov; 15th february 2006 at 08:13 amfff">.

the immediate workaround for this issue is:
code:
void exgigdigeometry::draw_fillstyle(exgigdigeometry::fillstyle fillstyle)
{
// ttf text can have fillstyles "for selection", "hollow"(?), or "solid"
// all other fillstyles are concidered "solid"
if(m_bprocessingttf && (fillstyle != kfsforselection) && (fillstyle != kfshollow))
fillstyle = kfssolid;
if(m_oldfillstyle != fillstyle)
{
m_oldfillstyle = fillstyle(fillstyle);
m_bbrushvalid = false;
if(m_logbrush.lbstyle == bs_pattern)
::deleteobject((hbitmap)m_logbrush.lbhatch); // delete old bitmap

hbitmap hpatbmp(null);
switch(fillstyle)
{
// these two styles (kcheckerboardfs and ksquaredotsfs)
// requires bitmap to be created
case kfscheckerboard:
{
oduint16 sclns[8];
sclns[0] = 0xff;
sclns[1] = 0xff;
sclns[2] = 0xff - 0x3c;
sclns[3] = 0xff - 0x24;
sclns[4] = 0xff - 0x24;
sclns[5] = 0xff - 0x3c;
sclns[6] = 0xff;
sclns[7] = 0xff;
hpatbmp = ::createbitmap(8, 8, 1, 1, sclns);
m_logbrush.lbhatch = (long)hpatbmp;
m_logbrush.lbstyle = bs_pattern;
break;
}
case kfssquaredots:
{
oduint16 sclns[8];
sclns[0] = 0xff - 0xc0;
sclns[1] = 0xff - 0xc0;
sclns[2] = 0xff;
sclns[3] = 0xff;
sclns[4] = 0xff;
sclns[5] = 0xff;
sclns[6] = 0xff;
sclns[7] = 0xff;
hpatbmp = ::createbitmap(8, 8, 1, 1, sclns);
m_logbrush.lbhatch = (long)hpatbmp;
m_logbrush.lbstyle = bs_pattern;
break;
}

// other fill styles can be found in windows - needn't creating
// bitmap
#ifndef _win32_wce
case kfscrosshatch:
{
m_logbrush.lbhatch = hs_cross;
m_logbrush.lbstyle = bs_hatched;
break;
}
case kfsdiamonds:
{
m_logbrush.lbhatch = hs_diagcross;
m_logbrush.lbstyle = bs_hatched;
break;
}
case kfshorizontalbars:
{
m_logbrush.lbhatch = hs_horizontal;
m_logbrush.lbstyle = bs_hatched;
break;
}
case kfsverticalbars:
{
m_logbrush.lbhatch = hs_vertical;
m_logbrush.lbstyle = bs_hatched;
break;
}
case kfsslantleft:
{
m_logbrush.lbhatch = hs_bdiagonal;
m_logbrush.lbstyle = bs_hatched;
break;
}
case kfsslantright:
{
m_logbrush.lbhatch = hs_fdiagonal;
m_logbrush.lbstyle = bs_hatched;
break;
}
#endif
case kfshollow:
{
m_logbrush.lbstyle = bs_hollow;
break;
}
case kfssolid:
{
m_logbrush.lbstyle = bs_solid;
break;
}
case kfsforselection:
{
hbitmap hpatbmp(null);
oduint16 sclns[8];
sclns[4] = sclns[0] = 0x22;
sclns[5] = sclns[1] = 0x55;
sclns[6] = sclns[2] = 0x88;
sclns[7] = sclns[3] = 0x55;
hpatbmp = ::createbitmap(8, 8, 1, 1, sclns);
m_logbrush.lbhatch = (long)hpatbmp;
m_logbrush.lbstyle = bs_pattern;
break;
}
default:
oda_fail();
break;
}
}
}
fix also will be available in 1.14.02.
sincerely yours,
george udov
last edited by george udov; 15th february 2006 at 08:34 amfff">.
we're using odgigeometrysimplifier::textproc( ... ) with the odgitextstyle parameter using a truetype fonts and we're getting the result seen from the attached bitmap.
the posted workaround will not apply to us right? just wanted to confirm. if so, can you also fix the code in odgigeometrysimplifier? or suggest how we can fix it ourselves.
thanks,
codey
attached images (2.4 kb, 11 views)


dear codey,
i think it is another issue (not related to described by mr cad-mind).
is it reproduce'able in odamfcapp sample?
if no, then you probably handle shellproc primitive incorrectly.
sincerely yours,
george udov
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】how to change thickness of ttf te yang686526 DirectDWG 0 2009-05-06 02:20 PM
【转帖】displaying true type yang686526 DirectDWG 0 2009-05-04 07:54 PM
【转帖】different vectorization of same file on windows and mac yang686526 DirectDWG 0 2009-05-04 07:29 PM
【转帖】chinese ttf rendering problem yang686526 DirectDWG 0 2009-05-04 05:45 PM
请教ttf宋体设置问题 yang686526 ObjectARX(AutoLISP) 0 2009-04-27 12:38 PM


所有的时间均为北京时间。 现在的时间是 06:08 PM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多