mask Color ARGB Transparency - Java 2D Graphics

Java examples for 2D Graphics:Color RGB

Description

mask Color ARGB Transparency

Demo Code


//package com.java2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        int color = 2;
        System.out.println(maskARGBTransparency(color));
    }//from www . j  a v a 2  s . com

    public static int maskARGBTransparency(int color) {
        int transparencyMask = 0xff << 24;
        return transparencyMask | color;
    }
}

Related Tutorials