System.util.RectangleJ.Outcode C# (CSharp) Méthode

Outcode() public méthode

public Outcode ( double x, double y ) : int
x double
y double
Résultat int
        public int Outcode(double x, double y) {
            int outp = 0;
            if (this.width <= 0) {
                outp |= OUT_LEFT | OUT_RIGHT;
            }
            else if (x < this.x) {
                outp |= OUT_LEFT;
            }
            else if (x > this.x + (double)this.width) {
                outp |= OUT_RIGHT;
            }
            if (this.height <= 0) {
                outp |= OUT_TOP | OUT_BOTTOM;
            }
            else if (y < this.y) {
                outp |= OUT_TOP;
            }
            else if (y > this.y + (double)this.height) {
                outp |= OUT_BOTTOM;
            }
            return outp;
        }