Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

451 B
Raw Blame
// Copyright 2014-2021 The winit contributors
// Copyright 2021-2023 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0

use crate::icon::{BadIcon, RgbaIcon};

#[derive(Debug, Clone)]
#[allow(dead_code)]
pub struct PlatformIcon(RgbaIcon);

impl PlatformIcon {
  pub fn from_rgba(rgba: Vec<u8>, width: u32, height: u32) -> Result<Self, BadIcon> {
    Ok(PlatformIcon(RgbaIcon::from_rgba(rgba, width, height)?))
  }
}