Beispiel #1
0
        ///
        ///	 * <param name="n"> </param>
        ///	 * <param name="rlOut"> </param>
        ///
        private void setupLayout(bool complex)
        {
            JDFLayout    lo         = (JDFLayout)n.appendMatchingResource("Layout", EnumProcessUsage.AnyInput, null);
            JDFLayerList ll         = lo.appendLayerList();
            const string layerNames = "BackGround Language";

            VString layers = new VString(layerNames, " ");

            if (complex)
            {
                layers.Add("Currency");
            }

            for (int i = 0; i < layers.Count; i++)
            {
                ll.appendLayerDetails().setName(layers.stringAt(i));
            }

            JDFRunList rlOutDe = (JDFRunList)rlOut.addPartition(EnumPartIDKey.PartVersion, "De");

            rlOutDe.setResStatus(EnumResStatus.Available, true);
            JDFRunList rlOutEn = (JDFRunList)rlOut.addPartition(EnumPartIDKey.PartVersion, "Fr");

            rlOutEn.setResStatus(EnumResStatus.Unavailable, true);
            if (complex)
            {
                JDFRunList rlOutSwiss = (JDFRunList)rlOut.addPartition(EnumPartIDKey.PartVersion, "Ch");
                rlOutSwiss.setResStatus(EnumResStatus.Unavailable, true);
            }

            for (int i = 0; i < 2; i++)
            {
                string     sheetName = "Sheet" + i;
                JDFLayout  lSheet    = (JDFLayout)lo.addPartition(EnumPartIDKey.SheetName, sheetName);
                JDFRunList rlSheet   = (JDFRunList)rlOutDe.addPartition(EnumPartIDKey.SheetName, sheetName);
                for (int j = 0; j < 2; j++)
                {
                    string     side   = j == 0 ? "Front" : "Back";
                    JDFLayout  lSide  = (JDFLayout)lSheet.addPartition(EnumPartIDKey.Side, side);
                    JDFRunList rlSide = (JDFRunList)rlSheet.addPartition(EnumPartIDKey.Side, side);
                    rlSide.setFileURL("file://out/De/" + sheetName + "_" + side + ".tif");
                    for (int k = 0; k < 4; k++)
                    {
                        JDFContentObject poBkg = lSide.appendContentObject();
                        int ord = i * 8 + j * 4 + k;
                        poBkg.setOrd(ord);
                        poBkg.setOrdID(ord);

                        JDFMatrix matrix = new JDFMatrix(1.0, 0.0, 0.0, 1.0, 0.0, 0.0);
                        matrix.shift((k % 2) * 200, (k / 2) * 300);
                        poBkg.setCTM(matrix);
                        poBkg.setLayerID(0);

                        JDFContentObject poLang = lSide.appendContentObject();
                        poLang.setOrd(ord + 16);
                        poLang.setOrdID(ord);
                        poLang.setCTM(matrix);
                        poLang.setLayerID(1);

                        if (complex)
                        {
                            JDFContentObject pOCurr = lSide.appendContentObject();
                            pOCurr.setOrd(ord + 32);
                            pOCurr.setOrdID(ord);
                            pOCurr.setCTM(matrix);
                            pOCurr.setLayerID(2);
                        }
                    }
                }
            }
        }