コード例 #1
0
        public static void Fill(int content, double opacity, int blend_mode)
        {
            PSX.CheckEnum(content, (int)con.phEnumBackgroundColor, (int)con.phEnumForegroundColor);
            PSX.CheckRange(opacity, 0, 100);
            PSX.CheckEnumEx(blend_mode, PSX.blend_modes);

            // Desc1
            var Desc1 = PSX.MakeNewDescriptor();

            Desc1.PutEnumerated((int)con.phKeyUsing, (int)con.phTypeFillContents, content);
            Desc1.PutUnitDouble((int)con.phKeyOpacity, (int)con.phUnitPercent, opacity);
            Desc1.PutEnumerated((int)con.phKeyMode, (int)con.phTypeBlendMode, blend_mode);

            // Play the event in photoshop
            PSX.PlayEvent((int)con.phEventFill, Desc1, (int)con.phDialogSilent, PSX.PlayBehavior.checkresult);
        }