高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】oddbhatchsetpixelsize90 and oddbhatchsetassociative90
oddbhatch::setpixelsize() and oddbhatch::setassociative()...
oddbhatch::setpixelsize() and oddbhatch::setassociative()......
i found that the associative of hatch is always "no" though i have set it true by phatch->setassociative(true);
also ,the pixelsize of hatch is always zero though i have setpixelsize(2.85);
the follow is my codes:
oddbhatchptr phatch = oddbhatch::createobject();
block_table->appendoddbentity(phatch);
// set the hatch properties.
phatch->setassociative(true);
phatch->setpixelsize(2.85);
phatch->setpattern(oddbhatch::kpredefined, hatch->get_hatchtype()->name().ascii());
phatch->sethatchstyle(oddbhatch::knormal);
phatch->setpatternangle(hatch->get_hatchtype()->savedwg_angle());
phatch->setpatternscale(hatch->get_hatchtype()->savedwg_scale());
your example code does not contain loops creating.
pixel size is saved to file only if one of hatch loops has kderived bit set in loop type.
you can find sample of creating associative hatch in odwriteex example. (you need specify objectids of associated entities for each loop by setassocobjidsat() or create a loop from objids array - appendloop(looptype, objidsarray)
sergey slezkin
|