Ejemplo n.º 1
0
        private void UpdateSide()
        {
            bool left = false, right = false, up = false, down = false;

            if (IsTileAt(_position - new Vector2(8, 0)))
            {
                left = true;
            }
            ;
            if (IsTileAt(_position + new Vector2(8, 0)))
            {
                right = true;
            }
            ;
            if (IsTileAt(_position + new Vector2(0, 8)))
            {
                up = true;
            }
            ;
            if (IsTileAt(_position - new Vector2(0, 8)))
            {
                down = true;
            }

            if (!left && right && !up && !down)
            {
                _side = EnumSides.Left;
            }
            if (left && !right && !up && !down)
            {
                _side = EnumSides.Right;
            }
            if (!left && !right && !up && down)
            {
                _side = EnumSides.Top;
            }
            if (!left && !right && up && !down)
            {
                _side = EnumSides.Bottom;
            }

            if (left && right && !up && !down)
            {
                _side = EnumSides.MiddleHorizontal;
            }
            if (!left && !right && up && down)
            {
                _side = EnumSides.MiddleVertical;
            }
            if (left && !right && up && down)
            {
                _side = EnumSides.MiddleRight;
            }
            if (left && right && up && down)
            {
                _side = EnumSides.Middle;
            }
            if (!left && right && up && down)
            {
                _side = EnumSides.MiddleLeft;
            }

            if (!left && right && !up && down)
            {
                _side = EnumSides.TopLeft;
            }
            if (left && right && !up && down)
            {
                _side = EnumSides.TopMiddle;
            }
            if (left && !right && !up && down)
            {
                _side = EnumSides.TopRight;
            }


            if (!left && right && up && !down)
            {
                _side = EnumSides.BottomLeft;
            }
            if (left && right && up && !down)
            {
                _side = EnumSides.BottomMiddle;
            }
            if (left && !right && up && !down)
            {
                _side = EnumSides.BottomRight;
            }
        }
Ejemplo n.º 2
0
 //         ---------------------------------------------------------------------
 //        Methods for Attribute Sides
 //        ---------------------------------------------------------------------
 ///
 ///          <summary> * (5) set attribute Sides </summary>
 ///          * <param name="enumVar">: the enumVar to set the attribute to </param>
 ///
 public virtual void setSides(EnumSides enumVar)
 {
     setAttribute(AttributeName.SIDES, enumVar == null ? null : enumVar.getName(), null);
 }
Ejemplo n.º 3
0
 ///
 ///          <summary> * (9) get attribute Sides </summary>
 ///          * <returns> the value of the attribute </returns>
 ///
 public virtual EnumSides getSides()
 {
     return(EnumSides.getEnum(getAttribute(AttributeName.SIDES, null, null)));
 }
Ejemplo n.º 4
0
 static JDFAutoLayoutIntent()
 {
     atrInfoTable[0]  = new AtrInfoTable(AttributeName.FOLIOCOUNT, 0x33333331, AttributeInfo.EnumAttributeType.enumeration, EnumFolioCount.getEnum(0), "Booklet");
     atrInfoTable[1]  = new AtrInfoTable(AttributeName.NUMBERUP, 0x33333333, AttributeInfo.EnumAttributeType.XYPair, null, "1 1");
     atrInfoTable[2]  = new AtrInfoTable(AttributeName.FINISHEDPAGEORIENTATION, 0x44444443, AttributeInfo.EnumAttributeType.enumeration, EnumFinishedPageOrientation.getEnum(0), null);
     atrInfoTable[3]  = new AtrInfoTable(AttributeName.ROTATEPOLICY, 0x33333311, AttributeInfo.EnumAttributeType.enumeration, EnumRotatePolicy.getEnum(0), null);
     atrInfoTable[4]  = new AtrInfoTable(AttributeName.SIDES, 0x33333333, AttributeInfo.EnumAttributeType.enumeration, EnumSides.getEnum(0), null);
     elemInfoTable[0] = new ElemInfoTable(ElementName.DIMENSIONS, 0x66666661);
     elemInfoTable[1] = new ElemInfoTable(ElementName.FINISHEDDIMENSIONS, 0x66666661);
     elemInfoTable[2] = new ElemInfoTable(ElementName.FINISHEDGRAINDIRECTION, 0x66666611);
     elemInfoTable[3] = new ElemInfoTable(ElementName.PAGES, 0x66666661);
     elemInfoTable[4] = new ElemInfoTable(ElementName.PAGEVARIANCE, 0x66666661);
     elemInfoTable[5] = new ElemInfoTable(ElementName.LAYOUT, 0x66666661);
     elemInfoTable[6] = new ElemInfoTable(ElementName.SIZEPOLICY, 0x66666611);
 }
Ejemplo n.º 5
0
 static JDFAutoDigitalPrintingParams()
 {
     atrInfoTable[0]  = new AtrInfoTable(AttributeName.DIRECTPROOFAMOUNT, 0x33333311, AttributeInfo.EnumAttributeType.integer, null, "0");
     atrInfoTable[1]  = new AtrInfoTable(AttributeName.MANUALFEED, 0x33333331, AttributeInfo.EnumAttributeType.boolean_, null, "false");
     atrInfoTable[2]  = new AtrInfoTable(AttributeName.COLLATE, 0x33333331, AttributeInfo.EnumAttributeType.enumeration, EnumCollate.getEnum(0), null);
     atrInfoTable[3]  = new AtrInfoTable(AttributeName.OUTPUTBIN, 0x33333331, AttributeInfo.EnumAttributeType.NMTOKEN, null, null);
     atrInfoTable[4]  = new AtrInfoTable(AttributeName.PRINTQUALITY, 0x44444443, AttributeInfo.EnumAttributeType.enumeration, EnumPrintQuality.getEnum(0), null);
     atrInfoTable[5]  = new AtrInfoTable(AttributeName.NONPRINTABLEMARGINBOTTOM, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[6]  = new AtrInfoTable(AttributeName.NONPRINTABLEMARGINLEFT, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[7]  = new AtrInfoTable(AttributeName.NONPRINTABLEMARGINRIGHT, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[8]  = new AtrInfoTable(AttributeName.NONPRINTABLEMARGINTOP, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[9]  = new AtrInfoTable(AttributeName.PAGEDELIVERY, 0x33333331, AttributeInfo.EnumAttributeType.enumeration, EnumPageDelivery.getEnum(0), null);
     atrInfoTable[10] = new AtrInfoTable(AttributeName.PRINTINGTYPE, 0x33333333, AttributeInfo.EnumAttributeType.enumeration, EnumPrintingType.getEnum(0), null);
     atrInfoTable[11] = new AtrInfoTable(AttributeName.SHEETLAY, 0x33333333, AttributeInfo.EnumAttributeType.enumeration, EnumSheetLay.getEnum(0), null);
     atrInfoTable[12] = new AtrInfoTable(AttributeName.SIDES, 0x33333111, AttributeInfo.EnumAttributeType.enumeration, EnumSides.getEnum(0), null);
     elemInfoTable[0] = new ElemInfoTable(ElementName.COMPONENT, 0x66666661);
     elemInfoTable[1] = new ElemInfoTable(ElementName.APPROVALPARAMS, 0x66666611);
     elemInfoTable[2] = new ElemInfoTable(ElementName.DISJOINTING, 0x66666661);
     elemInfoTable[3] = new ElemInfoTable(ElementName.INK, 0x66666111);
     elemInfoTable[4] = new ElemInfoTable(ElementName.MEDIA, 0x66666661);
     elemInfoTable[5] = new ElemInfoTable(ElementName.MEDIASOURCE, 0x77777776);
 }
Ejemplo n.º 6
0
 static JDFAutoStripCellParams()
 {
     atrInfoTable[0]  = new AtrInfoTable(AttributeName.BLEEDFACE, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[1]  = new AtrInfoTable(AttributeName.BLEEDSPINE, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[2]  = new AtrInfoTable(AttributeName.BLEEDHEAD, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[3]  = new AtrInfoTable(AttributeName.BLEEDFOOT, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[4]  = new AtrInfoTable(AttributeName.TRIMFACE, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[5]  = new AtrInfoTable(AttributeName.SPINE, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[6]  = new AtrInfoTable(AttributeName.TRIMHEAD, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[7]  = new AtrInfoTable(AttributeName.TRIMFOOT, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[8]  = new AtrInfoTable(AttributeName.FRONTOVERFOLD, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[9]  = new AtrInfoTable(AttributeName.BACKOVERFOLD, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[10] = new AtrInfoTable(AttributeName.MILLINGDEPTH, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[11] = new AtrInfoTable(AttributeName.CUTWIDTHHEAD, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[12] = new AtrInfoTable(AttributeName.CUTWIDTHFOOT, 0x33333311, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[13] = new AtrInfoTable(AttributeName.TRIMSIZE, 0x33333311, AttributeInfo.EnumAttributeType.XYPair, null, null);
     atrInfoTable[14] = new AtrInfoTable(AttributeName.CREEP, 0x33333311, AttributeInfo.EnumAttributeType.XYPair, null, null);
     atrInfoTable[15] = new AtrInfoTable(AttributeName.SIDES, 0x33333311, AttributeInfo.EnumAttributeType.enumeration, EnumSides.getEnum(0), null);
     atrInfoTable[16] = new AtrInfoTable(AttributeName.MASKBLEED, 0x33333111, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[17] = new AtrInfoTable(AttributeName.MASKSEPARATION, 0x33333111, AttributeInfo.EnumAttributeType.string_, null, null);
     atrInfoTable[18] = new AtrInfoTable(AttributeName.MASK, 0x33333111, AttributeInfo.EnumAttributeType.enumeration, EnumMask.getEnum(0), null);
 }
Ejemplo n.º 7
0
 static JDFAutoIDPLayout()
 {
     atrInfoTable[0]  = new AtrInfoTable(AttributeName.BORDER, 0x33333333, AttributeInfo.EnumAttributeType.double_, null, "0");
     atrInfoTable[1]  = new AtrInfoTable(AttributeName.FINISHEDPAGEORIENTATION, 0x33333333, AttributeInfo.EnumAttributeType.enumeration, EnumFinishedPageOrientation.getEnum(0), "Portrait");
     atrInfoTable[2]  = new AtrInfoTable(AttributeName.FORCEFRONTSIDE, 0x33333333, AttributeInfo.EnumAttributeType.string_, null, null);
     atrInfoTable[3]  = new AtrInfoTable(AttributeName.NUMBERUP, 0x33333333, AttributeInfo.EnumAttributeType.XYPair, null, null);
     atrInfoTable[4]  = new AtrInfoTable(AttributeName.PRESENTATIONDIRECTION, 0x33333333, AttributeInfo.EnumAttributeType.Any, null, null);
     atrInfoTable[5]  = new AtrInfoTable(AttributeName.ROTATE, 0x33333333, AttributeInfo.EnumAttributeType.double_, null, "0");
     atrInfoTable[6]  = new AtrInfoTable(AttributeName.SIDES, 0x33333333, AttributeInfo.EnumAttributeType.enumeration, EnumSides.getEnum(0), "OneSided");
     elemInfoTable[0] = new ElemInfoTable(ElementName.IMAGESHIFT, 0x33333333);
 }
Ejemplo n.º 8
0
 static JDFAutoImageSetterParams()
 {
     atrInfoTable[0]  = new AtrInfoTable(AttributeName.MIRRORAROUND, 0x33333333, AttributeInfo.EnumAttributeType.enumeration, EnumMirrorAround.getEnum(0), "None");
     atrInfoTable[1]  = new AtrInfoTable(AttributeName.POLARITY, 0x33333333, AttributeInfo.EnumAttributeType.enumeration, EnumPolarity.getEnum(0), "Positive");
     atrInfoTable[2]  = new AtrInfoTable(AttributeName.SIDES, 0x33333311, AttributeInfo.EnumAttributeType.enumeration, EnumSides.getEnum(0), "OneSidedFront");
     atrInfoTable[3]  = new AtrInfoTable(AttributeName.ADVANCEDISTANCE, 0x33333333, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[4]  = new AtrInfoTable(AttributeName.BURNOUTAREA, 0x33333331, AttributeInfo.EnumAttributeType.XYPair, null, null);
     atrInfoTable[5]  = new AtrInfoTable(AttributeName.CENTERACROSS, 0x33333333, AttributeInfo.EnumAttributeType.enumeration, EnumCenterAcross.getEnum(0), null);
     atrInfoTable[6]  = new AtrInfoTable(AttributeName.CUTMEDIA, 0x33333333, AttributeInfo.EnumAttributeType.boolean_, null, null);
     atrInfoTable[7]  = new AtrInfoTable(AttributeName.MANUALFEED, 0x33333311, AttributeInfo.EnumAttributeType.boolean_, null, null);
     atrInfoTable[8]  = new AtrInfoTable(AttributeName.NONPRINTABLEMARGINBOTTOM, 0x33333111, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[9]  = new AtrInfoTable(AttributeName.NONPRINTABLEMARGINLEFT, 0x33333111, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[10] = new AtrInfoTable(AttributeName.NONPRINTABLEMARGINRIGHT, 0x33333111, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[11] = new AtrInfoTable(AttributeName.NONPRINTABLEMARGINTOP, 0x33333111, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[12] = new AtrInfoTable(AttributeName.PUNCH, 0x44444333, AttributeInfo.EnumAttributeType.boolean_, null, null);
     atrInfoTable[13] = new AtrInfoTable(AttributeName.PUNCHTYPE, 0x44444333, AttributeInfo.EnumAttributeType.string_, null, null);
     atrInfoTable[14] = new AtrInfoTable(AttributeName.RESOLUTION, 0x33333333, AttributeInfo.EnumAttributeType.XYPair, null, null);
     atrInfoTable[15] = new AtrInfoTable(AttributeName.ROLLCUT, 0x33333333, AttributeInfo.EnumAttributeType.double_, null, null);
     atrInfoTable[16] = new AtrInfoTable(AttributeName.SOURCEWORKSTYLE, 0x33333311, AttributeInfo.EnumAttributeType.enumeration, EnumSourceWorkStyle.getEnum(0), null);
     atrInfoTable[17] = new AtrInfoTable(AttributeName.TRANSFERCURVE, 0x33333333, AttributeInfo.EnumAttributeType.TransferFunction, null, null);
     elemInfoTable[0] = new ElemInfoTable(ElementName.MEDIA, 0x66666661);
     elemInfoTable[1] = new ElemInfoTable(ElementName.FITPOLICY, 0x66666611);
 }