Skip to content

Commit 78d6697

Browse files
author
Evgeniy Sidenko
committed
Aspose.Imaging for Java 25.7 is released!
It presents the support for drawing operations over a VectorImage with the class Graphics
1 parent ef2a631 commit 78d6697

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

Examples/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.aspose</groupId>
55
<artifactId>imaging-java-examples</artifactId>
6-
<version>25.6</version>
6+
<version>25.7</version>
77
<packaging>jar</packaging>
88
<properties>
99
<maven.compiler.source>1.8</maven.compiler.source>
@@ -15,12 +15,12 @@
1515
<dependency>
1616
<groupId>com.aspose</groupId>
1717
<artifactId>aspose-imaging</artifactId>
18-
<version>25.6</version>
18+
<version>25.7</version>
1919
</dependency>
2020
<dependency>
2121
<groupId>com.aspose</groupId>
2222
<artifactId>aspose-imaging</artifactId>
23-
<version>25.6</version>
23+
<version>25.7</version>
2424
<classifier>javadoc</classifier>
2525
</dependency>
2626
</dependencies>

Examples/src/main/java/com/aspose/imaging/examples/RunExamples.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import com.aspose.imaging.examples.ModifyingImages.tiff.SetDPIInExportedPdf;
4444
import com.aspose.imaging.examples.ModifyingImages.webp.*;
4545
import com.aspose.imaging.examples.Photoshop.ExportImagestoPSDFormat;
46+
import com.aspose.imaging.examples.SVG.CommonGraphicsEngineForSvgEmfWmf;
4647
import com.aspose.imaging.examples.SVG.SVGToBMPConversion;
4748
import com.aspose.imaging.examples.SVG.UnifyExtractionOfRasterImagesEmbeddedInVectorFormats;
4849
import com.aspose.imaging.examples.WebP.OpenWebPFile;
@@ -355,6 +356,7 @@ public static void main(String[] args) throws IOException, InterruptedException,
355356
SaveEmfGraphics.main(args);
356357

357358
////SVG----------
359+
CommonGraphicsEngineForSvgEmfWmf.main(args);
358360
ConvOfOtherFormatsToSVG.main(args);
359361
SVGToEMFConversion.main(args);
360362
ConvertWMFToSVG.main(args);
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package com.aspose.imaging.examples.SVG;
2+
3+
import com.aspose.imaging.*;
4+
import com.aspose.imaging.brushes.SolidBrush;
5+
import com.aspose.imaging.examples.Logger;
6+
import com.aspose.imaging.examples.Utils;
7+
import com.aspose.imaging.fileformats.svg.SvgImage;
8+
9+
public class CommonGraphicsEngineForSvgEmfWmf
10+
{
11+
public static void main(String[] args)
12+
{
13+
Logger.startExample("SVGToBMPConversion");
14+
15+
String dataDir = Utils.getOutDir();
16+
17+
String filePath = dataDir + "test.svg";
18+
19+
try (VectorImage vectorImage = new SvgImage(100, 100))
20+
{
21+
Graphics g = new Graphics(vectorImage);
22+
g.fillRectangle(new SolidBrush(Color.getLightYellow()), 10, 10, 80, 80);
23+
g.drawRectangle(new Pen(Color.getRed(), 4), 10, 10, 80, 80);
24+
g.fillEllipse(new SolidBrush(Color.getLightGreen()), 20, 20, 60, 60);
25+
g.drawEllipse(new Pen(Color.getGreen(), 2), 20, 20, 60, 60);
26+
g.fillPie(new SolidBrush(Color.getLightBlue()), new Rectangle(30, 30, 40, 40), 0, 45);
27+
g.drawPie(new Pen(Color.getBlue(), 1), new Rectangle(30, 30, 40, 40), 0, 45);
28+
g.drawLine(new Pen(Color.getDarkRed(), 1), 10, 20, 90, 20);
29+
g.drawLines(new Pen(Color.getDarkRed(), 1), new PointF[] { new PointF(10, 90), new PointF(20, 80), new PointF(30, 90) });
30+
g.drawPolygon(new Pen(Color.getDarkRed(), 1), new PointF[] { new PointF(90, 90), new PointF(80, 80), new PointF(70, 90) });
31+
g.drawString("Hello World!", new Font("Arial", 14), new SolidBrush(Color.getDarkBlue()), new PointF(10, 50));
32+
g.drawArc(new Pen(Color.getBrown(), 1), new Rectangle(30, 30, 40, 40), 135, -90);
33+
vectorImage.save(filePath);
34+
}
35+
36+
Utils.deleteFile(filePath);
37+
38+
Logger.endExample();
39+
}
40+
}

0 commit comments

Comments
 (0)