コード例 #1
0
    private static sprᫎ[] smethod_12(sprᫎ[] A_0, VMLFill A_1)
    {
        sprᫎ[] rᫎArray;
        float  num4;
        float  num5;
        float  focus = A_1.Focus;

        if (smethod_16(A_1))
        {
            focus = (focus > 0f) ? (focus - 100f) : (focus + 100f);
        }
        if (focus == 0f)
        {
            return(A_0);
        }
        int length = A_0.Length;

        if (focus == 100f)
        {
            rᫎArray = new sprᫎ[A_0.Length];
            for (int j = 0; j < length; j++)
            {
                rᫎArray[(length - 1) - j] = new sprᫎ(A_0[j].ᜀ(), 1f - A_0[j].ᜁ());
            }
            return(rᫎArray);
        }
        focus *= 0.01f;
        if (focus > 0f)
        {
            num4 = 1f - focus;
            num5 = focus;
        }
        else
        {
            num4 = -focus;
            num5 = 1f + focus;
        }
        rᫎArray = new sprᫎ[length * 2];
        for (int i = 0; i < length; i++)
        {
            sprᫎ  rᫎ   = A_0[(focus > 0f) ? i : ((length - 1) - i)];
            float num2 = (focus > 0f) ? rᫎ.ᜁ() : (1f - rᫎ.ᜁ());
            rᫎArray[i] = new sprᫎ(rᫎ.ᜀ(), num2 * num4);
            rᫎArray[(rᫎArray.Length - 1) - i] = new sprᫎ(rᫎ.ᜀ(), 1f - (num2 * num5));
        }
        return(rᫎArray);
    }
コード例 #2
0
    private static void smethod_11(VMLFill A_0, sprℊ A_1)
    {
        Class954[] gradientColors = A_0.GradientColors;
        int        length         = gradientColors.Length;

        sprᫎ[] sourceArray = new sprᫎ[length];
        for (int i = 0; i < length; i++)
        {
            double num5 = (float)spr⤋.ᜀ(gradientColors[i].int_0);
            double num6 = A_0.Opacity2 + ((A_0.Opacity - A_0.Opacity2) * num5);
            sprⓚ   rⓚ   = smethod_0(sprⓚ.ᜀ(gradientColors[i].color_0), num6);
            sourceArray[i] = new sprᫎ(rⓚ, (float)num5);
        }
        int num4 = sourceArray.Length;

        if (sourceArray[0].ᜁ() > 0f)
        {
            num4++;
        }
        if (sourceArray[sourceArray.Length - 1].ᜁ() < 1f)
        {
            num4++;
        }
        sprᫎ[] destinationArray = sourceArray;
        if (num4 > sourceArray.Length)
        {
            destinationArray = new sprᫎ[num4];
            int destinationIndex = 0;
            if (sourceArray[0].ᜁ() > 0f)
            {
                destinationArray[0] = new sprᫎ(sourceArray[0].ᜀ(), 0f);
                destinationIndex++;
            }
            Array.Copy(sourceArray, 0, destinationArray, destinationIndex, sourceArray.Length);
            if (sourceArray[sourceArray.Length - 1].ᜁ() < 1f)
            {
                destinationArray[num4 - 1] = new sprᫎ(sourceArray[sourceArray.Length - 1].ᜀ(), 1f);
            }
        }
        A_1.ᜀ(smethod_12(destinationArray, A_0));
    }