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

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】oddbentity.highlight9true0 not appears for cloned entity in (http://www.dimcax.com/hust/showthread.php?t=17519)

yang686526 2009-05-06 07:40 PM

【转帖】oddbentity.highlight9true0 not appears for cloned entity in
 
oddbentity.highlight(true) not appears for cloned entity in
oddbentity.highlight(true) not appears for cloned entity in worlddraw(odgiworlddraw*)
hallo,
i will mimic autocad object highlighting, when mouse hover an entity.
my code:
class choverdrawable: public odgidrawableimpl<>
{
oddbentityptr m_pclone;
}
void choverdrawable::cloneentity()
{
m_pclone = 0;
oddbobjectptr pobj = entityid().safeopenobject();
oddbentityptr pentity = oddbentity::cast( pobj);
if ( pentity->clonemefordragging() )
{
m_pclone = oddbentity::cast( pentity->clone() );
}
if ( false == m_pclone.isnull() )
{
m_pclone->disableundorecording( true );
m_pclone->setpropertiesfrom( pentity.get() );
m_pclone->setcolor(m_color);
m_pclone->highlight(true);
}
}
bool choverdrawable:: worlddraw( odgiworlddraw* pworlddraw ) const
{
if(m_pclone.isnull()==false)
{
pworlddraw->geometry().draw(m_pclone); // not work
m_pclone->worlddraw(pworlddraw); // not work
}
}
has anibody a answer to this poblemm ?
sorry for the bad english description.
thanks

entity highlighting
in this example, creates a transient drawable. such drawables do not support highlighting, because not related to gsmodel and not have gscache.
only database-related drawables can be highlighted.


所有的时间均为北京时间。 现在的时间是 01:23 AM.