mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-05 03:48:12 +08:00
Add documentation to many parts of the Rust codebase (#552)
* add lots of doccomments * add conversion traits from layerdatatypes to layers * add suggested doc improvements * Code review changes Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
parent
1455ac3dce
commit
5c99cdef7f
@@ -1,5 +1,7 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Describes how overlapping SVG elements should be blended together.
|
||||
/// See the [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/blend-mode#examples) for examples.
|
||||
#[derive(PartialEq, Copy, Clone, Debug, Serialize, Deserialize)]
|
||||
pub enum BlendMode {
|
||||
Normal,
|
||||
@@ -21,6 +23,8 @@ pub enum BlendMode {
|
||||
}
|
||||
|
||||
impl BlendMode {
|
||||
/// Convert the enum to the CSS string for the blend mode.
|
||||
/// [Read more](https://developer.mozilla.org/en-US/docs/Web/CSS/blend-mode#values)
|
||||
pub fn to_svg_style_name(&self) -> &str {
|
||||
match self {
|
||||
BlendMode::Normal => "normal",
|
||||
|
||||
Reference in New Issue
Block a user