Android Open Source - pixel-art Tool Attributes

From Project

Back to project page pixel-art.


The source code is released under:

Apache License

If you think the Android project pixel-art listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

//from   w  ww. j a  v a 2 s  .  c o m

 * Created by ween on 11/2/14.
public class ToolAttributes {

    public static final int MIN_THICKNESS = 1;

    // Paint with which this tool will draw
    protected Paint paint;

    // This tool modifies the drawing (for example selection tool will not mutate the drawing)
    protected boolean mutator = true;

    // This tool returns a selectable region
    protected boolean selector = false;

    // This tool returns a colour
    protected boolean dropper = false;

    public ToolAttributes() {
        paint = new Paint();

    public final Paint getPaint() {
        return paint;

    public boolean isMutator() {
        return mutator;

    public void setMutator(boolean mutator) {
        this.mutator = mutator;

    public boolean isSelector() {
        return selector;

    public void setSelector(boolean selectable) {
        this.selector = selectable;

    public boolean isDropper() {
        return dropper;

    public void setDropper(boolean dropper) {
        this.dropper = dropper;


Java Source Code List