forked from 1b-agent/opencadstudio-upstream
Feat: Phase 4.3/4.4/4.5 — RasterImage, Wipeout, AttributeDefinition, AttributeEntity
- raster_image.rs: RasterImage renders as border rectangle + X diagonals (pixel placeholder); Wipeout renders border or polygon clip boundary; both support insertion_point grip, brightness/contrast/fade properties, clipping toggle, and mirror transform (u/v vectors reflected) - attribute.rs: AttributeDefinition renders default_value (or [TAG] if empty) as font-tessellated text; AttributeEntity renders the live value; both support insertion grip, position/height/rotation properties, and transform operations - mod.rs + traits.rs: wire up all four new entity types through the full dispatch chain (to_truck, grips, geometry_properties, apply_geom_prop, apply_grip, apply_transform) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
4a93fc4949
commit
27c0e74468
4 files changed
+607
No files matched your search
@@ -46,6 +46,10 @@ impl EntityTypeOps for EntityType {
|
||||
EntityType::Polyline3D(pl) => TruckConvertible::to_truck(pl, document),
|
||||
EntityType::Ray(ray) => TruckConvertible::to_truck(ray, document),
|
||||
EntityType::XLine(xl) => TruckConvertible::to_truck(xl, document),
|
||||
EntityType::RasterImage(img) => TruckConvertible::to_truck(img, document),
|
||||
EntityType::Wipeout(wo) => TruckConvertible::to_truck(wo, document),
|
||||
EntityType::AttributeDefinition(a) => TruckConvertible::to_truck(a, document),
|
||||
EntityType::AttributeEntity(a) => TruckConvertible::to_truck(a, document),
|
||||
EntityType::Text(text) => TruckConvertible::to_truck(text, document),
|
||||
EntityType::MText(text) => TruckConvertible::to_truck(text, document),
|
||||
EntityType::Leader(leader) => TruckConvertible::to_truck(leader, document),
|
||||
@@ -66,6 +70,10 @@ impl EntityTypeOps for EntityType {
|
||||
EntityType::Polyline3D(pl) => Grippable::grips(pl),
|
||||
EntityType::Ray(ray) => Grippable::grips(ray),
|
||||
EntityType::XLine(xl) => Grippable::grips(xl),
|
||||
EntityType::RasterImage(img) => Grippable::grips(img),
|
||||
EntityType::Wipeout(wo) => Grippable::grips(wo),
|
||||
EntityType::AttributeDefinition(a) => Grippable::grips(a),
|
||||
EntityType::AttributeEntity(a) => Grippable::grips(a),
|
||||
EntityType::Point(pt) => Grippable::grips(pt),
|
||||
EntityType::Spline(spline) => Grippable::grips(spline),
|
||||
EntityType::Text(text) => Grippable::grips(text),
|
||||
@@ -119,6 +127,22 @@ impl EntityTypeOps for EntityType {
|
||||
xl,
|
||||
text_style_names,
|
||||
)),
|
||||
EntityType::RasterImage(img) => Some(PropertyEditable::geometry_properties(
|
||||
img,
|
||||
text_style_names,
|
||||
)),
|
||||
EntityType::Wipeout(wo) => Some(PropertyEditable::geometry_properties(
|
||||
wo,
|
||||
text_style_names,
|
||||
)),
|
||||
EntityType::AttributeDefinition(a) => Some(PropertyEditable::geometry_properties(
|
||||
a,
|
||||
text_style_names,
|
||||
)),
|
||||
EntityType::AttributeEntity(a) => Some(PropertyEditable::geometry_properties(
|
||||
a,
|
||||
text_style_names,
|
||||
)),
|
||||
EntityType::Hatch(hatch) => Some(PropertyEditable::geometry_properties(
|
||||
hatch,
|
||||
text_style_names,
|
||||
@@ -174,6 +198,10 @@ impl EntityTypeOps for EntityType {
|
||||
EntityType::Polyline3D(pl) => PropertyEditable::apply_geom_prop(pl, field, value),
|
||||
EntityType::Ray(ray) => PropertyEditable::apply_geom_prop(ray, field, value),
|
||||
EntityType::XLine(xl) => PropertyEditable::apply_geom_prop(xl, field, value),
|
||||
EntityType::RasterImage(img) => PropertyEditable::apply_geom_prop(img, field, value),
|
||||
EntityType::Wipeout(wo) => PropertyEditable::apply_geom_prop(wo, field, value),
|
||||
EntityType::AttributeDefinition(a) => PropertyEditable::apply_geom_prop(a, field, value),
|
||||
EntityType::AttributeEntity(a) => PropertyEditable::apply_geom_prop(a, field, value),
|
||||
EntityType::Hatch(hatch) => PropertyEditable::apply_geom_prop(hatch, field, value),
|
||||
EntityType::Point(pt) => PropertyEditable::apply_geom_prop(pt, field, value),
|
||||
EntityType::Spline(spline) => PropertyEditable::apply_geom_prop(spline, field, value),
|
||||
@@ -200,6 +228,10 @@ impl EntityTypeOps for EntityType {
|
||||
EntityType::Polyline3D(pl) => Grippable::apply_grip(pl, grip_id, apply),
|
||||
EntityType::Ray(ray) => Grippable::apply_grip(ray, grip_id, apply),
|
||||
EntityType::XLine(xl) => Grippable::apply_grip(xl, grip_id, apply),
|
||||
EntityType::RasterImage(img) => Grippable::apply_grip(img, grip_id, apply),
|
||||
EntityType::Wipeout(wo) => Grippable::apply_grip(wo, grip_id, apply),
|
||||
EntityType::AttributeDefinition(a) => Grippable::apply_grip(a, grip_id, apply),
|
||||
EntityType::AttributeEntity(a) => Grippable::apply_grip(a, grip_id, apply),
|
||||
EntityType::Point(pt) => Grippable::apply_grip(pt, grip_id, apply),
|
||||
EntityType::Spline(spline) => Grippable::apply_grip(spline, grip_id, apply),
|
||||
EntityType::Text(text) => Grippable::apply_grip(text, grip_id, apply),
|
||||
@@ -226,6 +258,10 @@ impl EntityTypeOps for EntityType {
|
||||
EntityType::Polyline3D(pl) => Transformable::apply_transform(pl, t),
|
||||
EntityType::Ray(ray) => Transformable::apply_transform(ray, t),
|
||||
EntityType::XLine(xl) => Transformable::apply_transform(xl, t),
|
||||
EntityType::RasterImage(img) => Transformable::apply_transform(img, t),
|
||||
EntityType::Wipeout(wo) => Transformable::apply_transform(wo, t),
|
||||
EntityType::AttributeDefinition(a) => Transformable::apply_transform(a, t),
|
||||
EntityType::AttributeEntity(a) => Transformable::apply_transform(a, t),
|
||||
EntityType::MText(text) => Transformable::apply_transform(text, t),
|
||||
EntityType::Point(pt) => Transformable::apply_transform(pt, t),
|
||||
EntityType::Spline(spline) => Transformable::apply_transform(spline, t),
|
||||
|
||||
Reference in new issue
Block a user