Fix Rgb15::is_transparent bug
Former-commit-id: f12729b993ec9bef94a58a4d48982c7d3939c45b
This commit is contained in:
parent
639993edd7
commit
4a72a1035f
|
@ -33,7 +33,6 @@ bitfield! {
|
|||
pub r, set_r: 4, 0;
|
||||
pub g, set_g: 9, 5;
|
||||
pub b, set_b: 14, 10;
|
||||
pub is_transparent, _ : 15;
|
||||
}
|
||||
|
||||
impl Rgb15 {
|
||||
|
@ -56,6 +55,10 @@ impl Rgb15 {
|
|||
pub fn get_rgb(&self) -> (u16, u16, u16) {
|
||||
(self.r(), self.g(), self.b())
|
||||
}
|
||||
|
||||
pub fn is_transparent(&self) -> bool {
|
||||
self.0 == 0x8000
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Primitive, Copy, Clone)]
|
||||
|
|
Reference in a new issue