mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-20 03:18:06 +08:00
Instance tables refactor part 7: Rename "ImageFrame" -> "RasterData", "ImageFrameTable" -> "RasterDataType", and "RasterFrame" -> "RasterDataType"
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use bezier_rs::{ManipulatorGroup, Subpath};
|
||||
use glam::{DAffine2, DVec2};
|
||||
use graphene_core::RasterFrame;
|
||||
use graphene_core::RasterDataType;
|
||||
use graphene_core::instances::{Instance, InstanceRef};
|
||||
use graphene_core::vector::misc::BooleanOperation;
|
||||
use graphene_core::vector::style::Fill;
|
||||
@@ -203,7 +203,7 @@ fn flatten_vector_data(graphic_group_table: &GraphicGroupTable) -> VectorDataTab
|
||||
result_table.push(sub_vector_data);
|
||||
}
|
||||
}
|
||||
GraphicElement::RasterFrame(image) => {
|
||||
GraphicElement::RasterDataType(image) => {
|
||||
let make_instance = |transform| {
|
||||
// Convert the image frame into a rectangular subpath with the image's transform
|
||||
let mut subpath = Subpath::new_rect(DVec2::ZERO, DVec2::ONE);
|
||||
@@ -218,12 +218,12 @@ fn flatten_vector_data(graphic_group_table: &GraphicGroupTable) -> VectorDataTab
|
||||
|
||||
// Apply the parent group's transform to each element of raster data
|
||||
match image {
|
||||
RasterFrame::ImageFrame(image) => {
|
||||
RasterDataType::RasterData(image) => {
|
||||
for instance in image.instance_ref_iter() {
|
||||
result_table.push(make_instance(*element.transform * *instance.transform));
|
||||
}
|
||||
}
|
||||
RasterFrame::TextureFrame(image) => {
|
||||
RasterDataType::TextureData(image) => {
|
||||
for instance in image.instance_ref_iter() {
|
||||
result_table.push(make_instance(*element.transform * *instance.transform));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user