mirror of https://github.com/KLayout/klayout.git
[consider merging] bugfix: DeepRegion::processed with properties did not deliver polygon refs which made them unsuitable for further processing.
This commit is contained in:
parent
db9aee844d
commit
95f2335fc4
|
|
@ -124,6 +124,27 @@ private:
|
|||
db::Shapes *mp_shapes;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A shape delivery implementation for polygons with properties
|
||||
*/
|
||||
template <>
|
||||
struct DB_PUBLIC shape_collection_processor_delivery<db::PolygonWithProperties>
|
||||
{
|
||||
shape_collection_processor_delivery (db::Layout *layout, db::Shapes *shapes)
|
||||
: mp_layout (layout), mp_shapes (shapes)
|
||||
{ }
|
||||
|
||||
void put (const db::PolygonWithProperties &result)
|
||||
{
|
||||
tl::MutexLocker locker (&mp_layout->lock ());
|
||||
mp_shapes->insert (db::PolygonRefWithProperties (db::PolygonRef (result, mp_layout->shape_repository ()), result.properties_id ()));
|
||||
}
|
||||
|
||||
private:
|
||||
db::Layout *mp_layout;
|
||||
db::Shapes *mp_shapes;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A shape delivery implementation for texts
|
||||
*/
|
||||
|
|
@ -145,6 +166,27 @@ private:
|
|||
db::Shapes *mp_shapes;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A shape delivery implementation for texts with properties
|
||||
*/
|
||||
template <>
|
||||
struct DB_PUBLIC shape_collection_processor_delivery<db::TextWithProperties>
|
||||
{
|
||||
shape_collection_processor_delivery (db::Layout *layout, db::Shapes *shapes)
|
||||
: mp_layout (layout), mp_shapes (shapes)
|
||||
{ }
|
||||
|
||||
void put (const db::TextWithProperties &result)
|
||||
{
|
||||
tl::MutexLocker locker (&mp_layout->lock ());
|
||||
mp_shapes->insert (db::TextRefWithProperties (db::TextRef (result, mp_layout->shape_repository ()), result.properties_id ()));
|
||||
}
|
||||
|
||||
private:
|
||||
db::Layout *mp_layout;
|
||||
db::Shapes *mp_shapes;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A generic delivery
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue