All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jpedal.color.PdfColor Maven / Gradle / Ivy

/*
 * ===========================================
 * Java Pdf Extraction Decoding Access Library
 * ===========================================
 *
 * Project Info:  http://www.idrsolutions.com
 * Help section for developers at http://www.idrsolutions.com/support/
 *
 * (C) Copyright 1997-2017 IDRsolutions and Contributors.
 *
 * This file is part of JPedal/JPDF2HTML5
 *
 @LICENSE@
 *
 * ---------------
 * PdfColor.java
 * ---------------
 */
package org.jpedal.color;

import java.awt.Color;


/**
 * template for all shading operations
 */
public class PdfColor extends Color implements PdfPaint {

    public PdfColor(final float r, final float g, final float b) {
        super(r, g, b);
    }

    public PdfColor(final int r, final int g, final int b) {
        super(r, g, b);
    }

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    protected boolean isPattern;

    public PdfColor(final int raw) {
        super(((raw >> 16) & 255), ((raw >> 8) & 255), ((raw) & 255));
    }

    @Override
    public void setScaling(final double cropX, final double cropH, final float scaling, final float textX, final float textY) {
        //this.cropX=(int)cropX;
        //this.cropH=(int)cropH;
    }

    @Override
    public boolean isPattern() {
        return isPattern;
    }

    //constructor for pattern color
    @SuppressWarnings({"UnusedParameters", "UnusedDeclaration"})
    public void setPattern(final int dummy) {
        isPattern = true;
    }

    @Override
    public boolean isTexture() {
        return false;
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy