mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 12:24:16 +00:00
Remove CompositionMode enum
It was used in the previous TargetPixelBuffer interface, but this is no longer the case
This commit is contained in:
parent
d30dbeab58
commit
3a9ae8af0e
3 changed files with 0 additions and 26 deletions
|
|
@ -331,7 +331,6 @@ fn gen_corelib(
|
||||||
"SortOrder",
|
"SortOrder",
|
||||||
"BitmapFont",
|
"BitmapFont",
|
||||||
"PhysicalRegion",
|
"PhysicalRegion",
|
||||||
"CompositionMode",
|
|
||||||
]
|
]
|
||||||
.iter()
|
.iter()
|
||||||
.chain(items.iter())
|
.chain(items.iter())
|
||||||
|
|
|
||||||
|
|
@ -658,10 +658,6 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
# ifdef SLINT_FEATURE_EXPERIMENTAL
|
# ifdef SLINT_FEATURE_EXPERIMENTAL
|
||||||
/// This enum describes the how pixels from a source are merged with the pixels in a destination
|
|
||||||
/// image. This is a sub-set of the standard
|
|
||||||
/// [Porter-Duff](https://en.wikipedia.org/wiki/Alpha_compositing) modes.
|
|
||||||
using CompositionMode = cbindgen_private::CompositionMode;
|
|
||||||
/// Representation of a texture to blend in the destination buffer.
|
/// Representation of a texture to blend in the destination buffer.
|
||||||
// (FIXME: this is currently opaque, but should be exposed)
|
// (FIXME: this is currently opaque, but should be exposed)
|
||||||
using DrawTextureArgs = cbindgen_private::DrawTextureArgs;
|
using DrawTextureArgs = cbindgen_private::DrawTextureArgs;
|
||||||
|
|
@ -685,12 +681,6 @@ public:
|
||||||
/// Returns the number of lines in the buffer. This is the height of the buffer in pixels.
|
/// Returns the number of lines in the buffer. This is the height of the buffer in pixels.
|
||||||
virtual std::size_t num_lines() = 0;
|
virtual std::size_t num_lines() = 0;
|
||||||
|
|
||||||
/// Fill a rectangle at the specified pixel coordinates with the given color. Return true
|
|
||||||
/// if the operation succeeded; false otherwise;
|
|
||||||
virtual bool fill_rectangle(int16_t x, int16_t y, int16_t width, int16_t height,
|
|
||||||
const RgbaColor<uint8_t> &premultiplied_color,
|
|
||||||
CompositionMode composition_mode) = 0;
|
|
||||||
|
|
||||||
/// Draw a portion of provided texture to the specified pixel coordinates.
|
/// Draw a portion of provided texture to the specified pixel coordinates.
|
||||||
/// Each pixel of the texture is to be blended with the given colorize color as well as the
|
/// Each pixel of the texture is to be blended with the given colorize color as well as the
|
||||||
/// alpha value.
|
/// alpha value.
|
||||||
|
|
|
||||||
|
|
@ -224,21 +224,6 @@ impl From<RequestedOpenGLVersion> for RequestedGraphicsAPI {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This enum describes the how pixels from a source are merged with the pixels in a destination image.
|
|
||||||
/// This is a sub-set of the standard [Porter-Duff](https://en.wikipedia.org/wiki/Alpha_compositing) modes.
|
|
||||||
#[repr(u8)]
|
|
||||||
#[allow(dead_code)]
|
|
||||||
#[derive(Default, Copy, Clone, Debug)]
|
|
||||||
#[non_exhaustive]
|
|
||||||
pub enum CompositionMode {
|
|
||||||
/// Only pixels from the source target are drawn.
|
|
||||||
Source,
|
|
||||||
/// The source is placed over the destination.
|
|
||||||
#[default]
|
|
||||||
SourceOver,
|
|
||||||
// TODO: maybe add more modes (e.g. xor, plus darker, etc.)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Internal module for use by cbindgen and the C++ platform API layer.
|
/// Internal module for use by cbindgen and the C++ platform API layer.
|
||||||
#[cfg(feature = "ffi")]
|
#[cfg(feature = "ffi")]
|
||||||
pub mod ffi {
|
pub mod ffi {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue