reorder blit method enums in a different and still arbitrary order
This commit is contained in:
parent
b38a4b55bc
commit
0345571851
|
@ -10,14 +10,35 @@ use crate::math::rect::Rect;
|
||||||
pub enum IndexedBlitMethod {
|
pub enum IndexedBlitMethod {
|
||||||
/// Solid blit, no transparency or other per-pixel adjustments.
|
/// Solid blit, no transparency or other per-pixel adjustments.
|
||||||
Solid,
|
Solid,
|
||||||
|
SolidBlended {
|
||||||
|
blend_map: Rc<BlendMap>,
|
||||||
|
},
|
||||||
/// Same as [IndexedBlitMethod::Solid] but the drawn image can also be flipped horizontally
|
/// Same as [IndexedBlitMethod::Solid] but the drawn image can also be flipped horizontally
|
||||||
/// and/or vertically.
|
/// and/or vertically.
|
||||||
SolidFlipped {
|
SolidFlipped {
|
||||||
horizontal_flip: bool,
|
horizontal_flip: bool,
|
||||||
vertical_flip: bool,
|
vertical_flip: bool,
|
||||||
},
|
},
|
||||||
|
SolidFlippedBlended {
|
||||||
|
horizontal_flip: bool,
|
||||||
|
vertical_flip: bool,
|
||||||
|
blend_map: Rc<BlendMap>,
|
||||||
|
},
|
||||||
|
/// Same as [IndexedBlitMethod::Solid] except that the drawn pixels have their color indices offset
|
||||||
|
/// by the amount given.
|
||||||
|
SolidOffset(u8),
|
||||||
|
/// Combination of [IndexedBlitMethod::SolidFlipped] and [IndexedBlitMethod::SolidOffset].
|
||||||
|
SolidFlippedOffset {
|
||||||
|
horizontal_flip: bool,
|
||||||
|
vertical_flip: bool,
|
||||||
|
offset: u8,
|
||||||
|
},
|
||||||
/// Transparent blit, the specified source color pixels are skipped.
|
/// Transparent blit, the specified source color pixels are skipped.
|
||||||
Transparent(u8),
|
Transparent(u8),
|
||||||
|
TransparentBlended {
|
||||||
|
transparent_color: u8,
|
||||||
|
blend_map: Rc<BlendMap>,
|
||||||
|
},
|
||||||
/// Same as [IndexedBlitMethod::Transparent] but the drawn image can also be flipped horizontally
|
/// Same as [IndexedBlitMethod::Transparent] but the drawn image can also be flipped horizontally
|
||||||
/// and/or vertically.
|
/// and/or vertically.
|
||||||
TransparentFlipped {
|
TransparentFlipped {
|
||||||
|
@ -25,6 +46,12 @@ pub enum IndexedBlitMethod {
|
||||||
horizontal_flip: bool,
|
horizontal_flip: bool,
|
||||||
vertical_flip: bool,
|
vertical_flip: bool,
|
||||||
},
|
},
|
||||||
|
TransparentFlippedBlended {
|
||||||
|
transparent_color: u8,
|
||||||
|
horizontal_flip: bool,
|
||||||
|
vertical_flip: bool,
|
||||||
|
blend_map: Rc<BlendMap>,
|
||||||
|
},
|
||||||
/// Same as [IndexedBlitMethod::Transparent] except that the visible pixels on the destination are all
|
/// Same as [IndexedBlitMethod::Transparent] except that the visible pixels on the destination are all
|
||||||
/// drawn using the same color.
|
/// drawn using the same color.
|
||||||
TransparentSingle {
|
TransparentSingle {
|
||||||
|
@ -38,15 +65,6 @@ pub enum IndexedBlitMethod {
|
||||||
vertical_flip: bool,
|
vertical_flip: bool,
|
||||||
draw_color: u8,
|
draw_color: u8,
|
||||||
},
|
},
|
||||||
/// Same as [IndexedBlitMethod::Solid] except that the drawn pixels have their color indices offset
|
|
||||||
/// by the amount given.
|
|
||||||
SolidOffset(u8),
|
|
||||||
/// Combination of [IndexedBlitMethod::SolidFlipped] and [IndexedBlitMethod::SolidOffset].
|
|
||||||
SolidFlippedOffset {
|
|
||||||
horizontal_flip: bool,
|
|
||||||
vertical_flip: bool,
|
|
||||||
offset: u8,
|
|
||||||
},
|
|
||||||
/// Same as [IndexedBlitMethod::Transparent] except that the drawn pixels have their color indices
|
/// Same as [IndexedBlitMethod::Transparent] except that the drawn pixels have their color indices
|
||||||
/// offset by the amount given. The transparent color check is not affected by the offset and
|
/// offset by the amount given. The transparent color check is not affected by the offset and
|
||||||
/// is always treated as an absolute palette color index.
|
/// is always treated as an absolute palette color index.
|
||||||
|
@ -65,6 +83,12 @@ pub enum IndexedBlitMethod {
|
||||||
scale_x: f32,
|
scale_x: f32,
|
||||||
scale_y: f32,
|
scale_y: f32,
|
||||||
},
|
},
|
||||||
|
RotoZoomBlended {
|
||||||
|
angle: f32,
|
||||||
|
scale_x: f32,
|
||||||
|
scale_y: f32,
|
||||||
|
blend_map: Rc<BlendMap>,
|
||||||
|
},
|
||||||
/// Same as [IndexedBlitMethod::RotoZoom] except that the specified source color pixels are skipped.
|
/// Same as [IndexedBlitMethod::RotoZoom] except that the specified source color pixels are skipped.
|
||||||
RotoZoomTransparent {
|
RotoZoomTransparent {
|
||||||
angle: f32,
|
angle: f32,
|
||||||
|
@ -72,6 +96,13 @@ pub enum IndexedBlitMethod {
|
||||||
scale_y: f32,
|
scale_y: f32,
|
||||||
transparent_color: u8,
|
transparent_color: u8,
|
||||||
},
|
},
|
||||||
|
RotoZoomTransparentBlended {
|
||||||
|
angle: f32,
|
||||||
|
scale_x: f32,
|
||||||
|
scale_y: f32,
|
||||||
|
transparent_color: u8,
|
||||||
|
blend_map: Rc<BlendMap>,
|
||||||
|
},
|
||||||
/// Same as [IndexedBlitMethod::RotoZoom] except that the drawn pixels have their color indices
|
/// Same as [IndexedBlitMethod::RotoZoom] except that the drawn pixels have their color indices
|
||||||
/// offset by the amount given.
|
/// offset by the amount given.
|
||||||
RotoZoomOffset {
|
RotoZoomOffset {
|
||||||
|
@ -90,37 +121,6 @@ pub enum IndexedBlitMethod {
|
||||||
transparent_color: u8,
|
transparent_color: u8,
|
||||||
offset: u8,
|
offset: u8,
|
||||||
},
|
},
|
||||||
SolidBlended {
|
|
||||||
blend_map: Rc<BlendMap>,
|
|
||||||
},
|
|
||||||
SolidFlippedBlended {
|
|
||||||
horizontal_flip: bool,
|
|
||||||
vertical_flip: bool,
|
|
||||||
blend_map: Rc<BlendMap>,
|
|
||||||
},
|
|
||||||
TransparentBlended {
|
|
||||||
transparent_color: u8,
|
|
||||||
blend_map: Rc<BlendMap>,
|
|
||||||
},
|
|
||||||
TransparentFlippedBlended {
|
|
||||||
transparent_color: u8,
|
|
||||||
horizontal_flip: bool,
|
|
||||||
vertical_flip: bool,
|
|
||||||
blend_map: Rc<BlendMap>,
|
|
||||||
},
|
|
||||||
RotoZoomBlended {
|
|
||||||
angle: f32,
|
|
||||||
scale_x: f32,
|
|
||||||
scale_y: f32,
|
|
||||||
blend_map: Rc<BlendMap>,
|
|
||||||
},
|
|
||||||
RotoZoomTransparentBlended {
|
|
||||||
angle: f32,
|
|
||||||
scale_x: f32,
|
|
||||||
scale_y: f32,
|
|
||||||
transparent_color: u8,
|
|
||||||
blend_map: Rc<BlendMap>,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl IndexedBitmap {
|
impl IndexedBitmap {
|
||||||
|
|
|
@ -8,14 +8,24 @@ use crate::math::rect::Rect;
|
||||||
pub enum RgbaBlitMethod {
|
pub enum RgbaBlitMethod {
|
||||||
/// Solid blit, no transparency or other per-pixel adjustments.
|
/// Solid blit, no transparency or other per-pixel adjustments.
|
||||||
Solid,
|
Solid,
|
||||||
|
SolidBlended(BlendFunction),
|
||||||
/// Same as [RgbaBlitMethod::Solid] but the drawn image can also be flipped horizontally
|
/// Same as [RgbaBlitMethod::Solid] but the drawn image can also be flipped horizontally
|
||||||
/// and/or vertically.
|
/// and/or vertically.
|
||||||
SolidFlipped {
|
SolidFlipped {
|
||||||
horizontal_flip: bool,
|
horizontal_flip: bool,
|
||||||
vertical_flip: bool,
|
vertical_flip: bool,
|
||||||
},
|
},
|
||||||
|
SolidFlippedBlended {
|
||||||
|
horizontal_flip: bool,
|
||||||
|
vertical_flip: bool,
|
||||||
|
blend: BlendFunction,
|
||||||
|
},
|
||||||
/// Transparent blit, the specified source color pixels are skipped.
|
/// Transparent blit, the specified source color pixels are skipped.
|
||||||
Transparent(u32),
|
Transparent(u32),
|
||||||
|
TransparentBlended {
|
||||||
|
transparent_color: u32,
|
||||||
|
blend: BlendFunction,
|
||||||
|
},
|
||||||
/// Same as [RgbaBlitMethod::Transparent] but the drawn image can also be flipped horizontally
|
/// Same as [RgbaBlitMethod::Transparent] but the drawn image can also be flipped horizontally
|
||||||
/// and/or vertically.
|
/// and/or vertically.
|
||||||
TransparentFlipped {
|
TransparentFlipped {
|
||||||
|
@ -23,6 +33,12 @@ pub enum RgbaBlitMethod {
|
||||||
horizontal_flip: bool,
|
horizontal_flip: bool,
|
||||||
vertical_flip: bool,
|
vertical_flip: bool,
|
||||||
},
|
},
|
||||||
|
TransparentFlippedBlended {
|
||||||
|
transparent_color: u32,
|
||||||
|
horizontal_flip: bool,
|
||||||
|
vertical_flip: bool,
|
||||||
|
blend: BlendFunction,
|
||||||
|
},
|
||||||
/// Same as [RgbaBlitMethod::Transparent] except that the visible pixels on the destination are all
|
/// Same as [RgbaBlitMethod::Transparent] except that the visible pixels on the destination are all
|
||||||
/// drawn using the same color.
|
/// drawn using the same color.
|
||||||
TransparentSingle {
|
TransparentSingle {
|
||||||
|
@ -43,6 +59,12 @@ pub enum RgbaBlitMethod {
|
||||||
scale_x: f32,
|
scale_x: f32,
|
||||||
scale_y: f32,
|
scale_y: f32,
|
||||||
},
|
},
|
||||||
|
RotoZoomBlended {
|
||||||
|
angle: f32,
|
||||||
|
scale_x: f32,
|
||||||
|
scale_y: f32,
|
||||||
|
blend: BlendFunction,
|
||||||
|
},
|
||||||
/// Same as [RgbaBlitMethod::RotoZoom] except that the specified source color pixels are skipped.
|
/// Same as [RgbaBlitMethod::RotoZoom] except that the specified source color pixels are skipped.
|
||||||
RotoZoomTransparent {
|
RotoZoomTransparent {
|
||||||
angle: f32,
|
angle: f32,
|
||||||
|
@ -50,28 +72,6 @@ pub enum RgbaBlitMethod {
|
||||||
scale_y: f32,
|
scale_y: f32,
|
||||||
transparent_color: u32,
|
transparent_color: u32,
|
||||||
},
|
},
|
||||||
SolidBlended(BlendFunction),
|
|
||||||
SolidFlippedBlended {
|
|
||||||
horizontal_flip: bool,
|
|
||||||
vertical_flip: bool,
|
|
||||||
blend: BlendFunction,
|
|
||||||
},
|
|
||||||
TransparentBlended {
|
|
||||||
transparent_color: u32,
|
|
||||||
blend: BlendFunction,
|
|
||||||
},
|
|
||||||
TransparentFlippedBlended {
|
|
||||||
transparent_color: u32,
|
|
||||||
horizontal_flip: bool,
|
|
||||||
vertical_flip: bool,
|
|
||||||
blend: BlendFunction,
|
|
||||||
},
|
|
||||||
RotoZoomBlended {
|
|
||||||
angle: f32,
|
|
||||||
scale_x: f32,
|
|
||||||
scale_y: f32,
|
|
||||||
blend: BlendFunction,
|
|
||||||
},
|
|
||||||
RotoZoomTransparentBlended {
|
RotoZoomTransparentBlended {
|
||||||
angle: f32,
|
angle: f32,
|
||||||
scale_x: f32,
|
scale_x: f32,
|
||||||
|
|
Loading…
Reference in a new issue