Skip to content

Commit

Permalink
fix typo tailed -> tiled (software-mansion#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
wkozyra95 committed Oct 10, 2023
1 parent 97b9a35 commit 82879bf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions compositor_common/src/scene/builtin_transformations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
use serde_with::{DeserializeFromStr, SerializeDisplay};

use crate::error::BuiltinSpecValidationError;
use crate::scene::builtin_transformations::tailed_layout::TailedLayoutSpec;
use crate::scene::builtin_transformations::tiled_layout::TiledLayoutSpec;
use crate::scene::constraints::input_count::InputCountConstraint;
use crate::util::align::HorizontalAlign;
use crate::util::align::VerticalAlign;
Expand All @@ -17,7 +17,7 @@ use super::NodeSpec;
use super::Resolution;

pub(crate) mod fixed_postion_layout;
pub mod tailed_layout;
pub mod tiled_layout;

pub use fixed_postion_layout::FixedPositionLayoutSpec;
pub use fixed_postion_layout::TextureLayout;
Expand All @@ -34,7 +34,7 @@ pub enum BuiltinSpec {
strategy: TransformToResolutionStrategy,
},
FixedPositionLayout(FixedPositionLayoutSpec),
TiledLayout(TailedLayoutSpec),
TiledLayout(TiledLayoutSpec),
MirrorImage {
#[serde(default)]
mode: MirrorMode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{scene::Resolution, util::align::HorizontalAlign};
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)]
pub struct TailedLayoutSpec {
pub struct TiledLayoutSpec {
#[serde(default)]
pub background_color_rgba: RGBAColor,
#[serde(default = "default_tile_aspect_ratio")]
Expand Down
4 changes: 2 additions & 2 deletions compositor_render/src/transformations/builtin/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use self::{
corners_rounding::CornersRoundingParams,
fixed_position_layout::new_fixed_position_layout_params,
mirror_image::MirrorModeExt,
tiled_layout::new_tailed_layout_params,
tiled_layout::new_tiled_layout_params,
transform_to_resolution::{new_fit_to_resolution_params, FillParams},
};

Expand Down Expand Up @@ -77,7 +77,7 @@ impl RenderParams {
RenderParams::BoxLayout(new_fixed_position_layout_params(spec, input_resolutions))
}
BuiltinSpec::TiledLayout(spec) => {
RenderParams::BoxLayout(new_tailed_layout_params(spec, input_resolutions))
RenderParams::BoxLayout(new_tiled_layout_params(spec, input_resolutions))
}
BuiltinSpec::MirrorImage { mode } => RenderParams::MirrorMode(*mode),
BuiltinSpec::CornersRounding { border_radius } => RenderParams::CornersRounding(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use compositor_common::{
scene::{builtin_transformations::tailed_layout::TailedLayoutSpec, Resolution},
scene::{builtin_transformations::tiled_layout::TiledLayoutSpec, Resolution},
util::align::{HorizontalAlign, VerticalAlign},
};

Expand All @@ -20,8 +20,8 @@ impl RowsCols {
}
}

pub fn new_tailed_layout_params(
spec: &TailedLayoutSpec,
pub fn new_tiled_layout_params(
spec: &TiledLayoutSpec,
input_resolutions: &[Option<Resolution>],
) -> BoxLayoutParams {
let inputs = input_resolutions
Expand Down Expand Up @@ -60,7 +60,7 @@ fn layout_tiles(
inputs_count: u32,
rows_cols: &RowsCols,
tile_size: Resolution,
spec: &TailedLayoutSpec,
spec: &TiledLayoutSpec,
) -> Vec<BoxLayout> {
let mut layouts = Vec::with_capacity(inputs_count as usize);

Expand Down Expand Up @@ -130,7 +130,7 @@ fn layout_tiles(
layouts
}

fn tile_size(rows_cols: &RowsCols, spec: &TailedLayoutSpec) -> Resolution {
fn tile_size(rows_cols: &RowsCols, spec: &TiledLayoutSpec) -> Resolution {
let x_padding = (rows_cols.cols * 2 * spec.padding) as f32;
let y_padding = (rows_cols.rows * 2 * spec.padding) as f32;
let x_margin = ((rows_cols.cols + 1) * spec.margin) as f32;
Expand All @@ -153,7 +153,7 @@ fn tile_size(rows_cols: &RowsCols, spec: &TailedLayoutSpec) -> Resolution {

/// Optimize number of rows and cols to maximize space covered by tiles,
/// preserving tile aspect_ratio
fn optimize_inputs_layout(inputs_count: u32, spec: &TailedLayoutSpec) -> RowsCols {
fn optimize_inputs_layout(inputs_count: u32, spec: &TiledLayoutSpec) -> RowsCols {
let mut best_rows_cols = RowsCols::from_rows_count(inputs_count, 1);
let mut best_tile_width = 0;

Expand Down

0 comments on commit 82879bf

Please sign in to comment.