internal static spr᧢ smethod_14(ShapeObject A_0, SizeF A_1) { VMLFill fill = A_0.Fill; if (Class1022.smethod_0(A_1)) { return(null); } if (smethod_4(fill)) { return(smethod_1(sprⓚ.ᜀ(fill.ColorInternal), fill.Opacity)); } RectangleF ef = new RectangleF(0f, 0f, A_1.Width, A_1.Height); float num = -((float)fill.Angle) - 90f; float totalRotation = (float)A_0.TotalRotation; RectangleF empty = RectangleF.Empty; spr➂ r➂ = new spr➂(); if (A_0.IsTextureRotated) { r➂.ᜀ(totalRotation + num, spr.ᜁ(ef)); empty = spr.ᜁ(ef, -num); } else { r➂.ᜀ(num, spr.ᜁ(ef)); empty = spr.ᜁ(spr.ᜁ(ef, totalRotation), -num); } spr⡀ r⡀ = new spr⡀(empty); r⡀.ᜀ(r➂); smethod_7(fill, r⡀); return(r⡀); }
internal static spr᧢ smethod_13(ShapeObject A_0, SizeF A_1) { PointF tf; VMLFill fill = A_0.Fill; sprᲆ rᲆ = new sprᲆ(); sprᧂ rᧂ = new sprᧂ(); rᧂ.ᜀ(true); rᲆ.ᜁ(rᧂ); RectangleF ef = new RectangleF(0f, 0f, A_1.Width, A_1.Height); if (A_0.IsTextureRotated) { tf = spr.ᜁ(spr.ᜀ((float)fill.FocusLeft, (float)fill.FocusTop, ef), spr.ᜁ(ef), (float)A_0.Rotation); PointF[] tfArray = spr.ᜀ(ef, (float)A_0.Rotation); rᧂ.ᜃ(tfArray); } else { RectangleF ef2 = spr.ᜁ(ef, (float)A_0.Rotation); tf = spr.ᜀ((float)fill.FocusLeft, (float)fill.FocusTop, ef2); rᧂ.ᜁ(ef2); } return(smethod_6(rᲆ, fill, tf)); }
private VMLFill method_20() { if (this.vmlfill_0 == null) { this.vmlfill_0 = new VMLFill(this.shapeObject_0); } return(this.vmlfill_0); }
internal spr➂ method_3(spr❯ A_0, bool A_1, VMLFill A_2) { PointF[] tfArray2 = new PointF[] { PointF.Empty, new PointF((float)this.shapeObject_0.CoordSizeWidth, 0f), new PointF((float)this.shapeObject_0.CoordSizeWidth, (float)this.shapeObject_0.CoordSizeHeight), new PointF(0f, (float)this.shapeObject_0.CoordSizeHeight) }; this.method_1(tfArray2, false); RectangleF ef = smethod_6(tfArray2); float x = ef.X; float y = ef.Y; float width = ef.Width; float height = ef.Height; if (this.shapeObject_0.IsTextureRotated) { RectangleF ef2 = this.shapeObject_0.method_47(new RectangleF(0f, 0f, this.sizeF_0.Width, this.sizeF_0.Height)); width = ef2.Width; height = ef2.Height; } RectangleF ef3 = new RectangleF(x, y, width, height); if (!A_2.Tiled) { this.method_6(ref ef3, A_2.Stretch); } else { this.method_4(ref ef3, A_2.Tile, A_0, ef); } x = ef3.X; y = ef3.Y; width = ef3.Width; height = ef3.Height; float num6 = width / ((float)A_0.ᜑ().Width); float num5 = height / ((float)A_0.ᜑ().Height); if (A_1) { if (num6 > num5) { num5 = num6; } else { num6 = num5; } } spr➂ r➂ = new spr➂(); r➂.ᜁ(num6, num5, MatrixOrder.Prepend); double num7 = this.float_2 + this.shapeObject_0.Rotation; if (this.shapeObject_0.IsTextureRotated && (num7 != 0.0)) { x = tfArray2[0].X; y = tfArray2[0].Y; r➂.ᜀ((float)num7, MatrixOrder.Append); } r➂.ᜀ(x, y, MatrixOrder.Append); return(r➂); }
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); }
private void method_5() { VMLFill fill = this.method_20(); if (!fill.On) { this.spr᧢_0 = null; } else { if (this.shapeObject_0.IsTextureRotated) { double rotation = this.shapeObject_0.Rotation; } switch (fill.FillType) { case FillType.Pattern: this.spr᧢_0 = Class1075.smethod_2(fill.ImageBytes, this.class724_0.method_11(), sprⓚ.ᜀ(fill.ColorInternal), sprⓚ.ᜀ(fill.Color2Internal)); return; case FillType.Texture: this.spr᧢_0 = Class1075.smethod_15(fill, this.class724_0.method_11(), this.class316_0); return; case FillType.Picture: this.spr᧢_0 = Class1075.smethod_3(fill, this.class724_0.method_11(), this.class316_0); return; case FillType.Shade: case FillType.ShadeScale: case FillType.ShadeTitle: case FillType.ShadeUnscale: this.spr᧢_0 = Class1075.smethod_14(this.shapeObject_0, this.sizeF_1); return; case FillType.ShadeCenter: this.spr᧢_0 = Class1075.smethod_13(this.shapeObject_0, this.sizeF_1); return; case FillType.ShadeShape: this.spr᧢_0 = this.method_28().IsWordArt ? Class1075.smethod_13(this.shapeObject_0, this.sizeF_1) : Class1075.smethod_6(this.sprᲆ_0, fill, new PointF(this.sizeF_1.Width * 0.5f, this.sizeF_1.Height * 0.5f)); return; } this.spr᧢_0 = Class1075.smethod_1(sprⓚ.ᜀ(fill.ColorInternal), fill.Opacity); } }
internal static bool smethod_16(VMLFill A_0) { switch (A_0.FillType) { case FillType.Shade: case FillType.ShadeScale: case FillType.ShadeTitle: switch (((int)A_0.Angle)) { case -135: case -90: case -45: return(true); } return(false); } return(false); }
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)); }
internal static spr᧢ smethod_15(VMLFill A_0, byte[] A_1, Class316 A_2) { spr⍂ r⍂; spr❯ r❯; if (A_1 == null) { A_1 = A_0.ImageBytes; } if (A_1 == null) { return(smethod_1(sprⓚ.ᜀ(A_0.ColorInternal), A_0.Opacity)); } if (!A_0.Tiled) { r⍂ = new spr⍂(A_1); } else { switch (A_0.Tile.flipOrientation_0) { case FlipOrientation.Horizontal: r⍂ = new spr⍂(A_1, WrapMode.TileFlipX); goto Label_007E; case FlipOrientation.Vertical: r⍂ = new spr⍂(A_1, WrapMode.TileFlipY); goto Label_007E; case FlipOrientation.Both: r⍂ = new spr⍂(A_1, WrapMode.TileFlipXY); goto Label_007E; } r⍂ = new spr⍂(A_1, WrapMode.Tile); } Label_007E: r❯ = spr≨.(A_1); r⍂.ᜀ(A_2.method_3(r❯, A_0.LockAspectRatio, A_0)); return(r⍂); }
internal spr➂ method_2(spr❯ A_0, bool A_1, VMLFill A_2) { return(this.method_3(A_0, A_1, A_2)); }