vector-graphics

MS Word: Preserving vector graphics (SVG) when saving document as PDF

邮差的信 提交于 2019-12-10 14:49:33
问题 Microsoft recently added SVG support to Word 2016. But when trying to save a document containing a SVG vector graphic as PDF the graphic will be converted to a raster image. I tried to change the Image Size and Quality Options (-> "do not compress images in file" and "high fidelity") but this had no effect whats-o-ever. My second approach was to use the "Microsoft Print to PDF"-printer but this didn't preserve the graphics either. Is there a way to preserve the scalability of my graphics when

Cannot render vector tiles (.mbtiles) file with leaflet

狂风中的少年 提交于 2019-12-10 10:16:16
问题 I am trying to render some locally-stored and vector-based tiles download from OpenMapTile. The reason I am doing that is because my end application will only run on a computer that cannot be connected to the internet. I have read many different things on whether or not leaflet can render vector-based tiles but it seems that it can from some examples. It seems that it is not possible with Vector Grid that only does raster tiles but that it is possible with Leaflet.TileLayer.MBTiles So I tried

Scale different parts of SVG file differently

别来无恙 提交于 2019-12-09 12:48:57
问题 I need a variable-height svg-graphic for a ticket with serrated edges. The top and bottom segments should scale to size maintaining a fixed aspect ratio while the middle segment should stretch to fit the size of the container. This image should be illustrative I found this jsFiddle doing pretty much what I would like just horizontally instead of vertically but I'm not well-versed enough with viewbox to understand what is happening and adapting it for my needs. I just managed to mess up my

Is DxScene the “WPF for Delphi”? Anyone used it?

☆樱花仙子☆ 提交于 2019-12-09 06:09:46
问题 I am playing with DxScene and VxScene: http://www.ksdev.com/dxscene/index.html It looks very nice and powerful: 3d accelerated vector graphics, cross plaform, nice effects, many 2d GUI controls (vector based), good scaling, transparency, rotating (x, y, z), 3d models, etc. Even with many effects, the CPU stays very low (0%)! http://www.ksdev.com/dxscene/snapshot/screen0.jpeg But can it be seen as a good WPF alternative for Delphi? And does anyone use it instead of normal Delphi VCL? 回答1: Yes,

Displaying vector graphics in a browser

谁说胖子不能爱 提交于 2019-12-09 05:04:30
问题 I need to display some interactive (attaching with DOM listeners etc. and event handling) vector graphics in web site I am working on. There is a W3C recommendation for SVG though this format is still not recognized by Internet Explorer support of which is a must (for a public website). IE handles VML though and there are even javascript libraries that do some canvas-like drawing depending on a browser (SVG vs. VML) - excanvas, GFX of Dojo Toolkit and more. That would be nice and acceptable

Rectangle intersection

限于喜欢 提交于 2019-12-09 03:54:34
问题 Is there any known approach to compute the intersection rectangle between two rectangles? I mean if the rectangle A is defined by (x1,y2, x2,y2) and B by (x3,y3, x4,y4), how do I compute the coordinates of the intersection rectangle C (x5,y5, x6,y6)? Thanks. 回答1: The general problem of intersecting polygons is explained in detail in here: http://davis.wpi.edu/~matt/courses/clipping . Incidentally, one of the best libraries for the task, with bindings for several programming languages, is GPC

Loading SVG based image assets for iOS app

可紊 提交于 2019-12-08 14:47:03
问题 I purchased an icon from thenounproject as an SVG image. I then use a macOS program called Gapplin to export this SVG into a PNG image. It comes out as a 100x100 pixel image. I then open this PNG image with Preview program and go Tools -> Adjust Size and create 10x10, 20x20 and 30x30 images. I then load these images as 1x, 2x, 3x in Xcode. Is this the correct method? 回答1: No, it's not the optimal solution. Your current solution works, of course, but it's far from ideal. You are losing

Fast library to replace CDC vector graphics

自闭症网瘾萝莉.ら 提交于 2019-12-08 08:53:58
问题 I have a mature MFC C++ application that displays on screen and prints using CDC wrappings on the Win32 GDI. While it has been optimized over the years, I would like to replace it with something a bit faster. The graphics included rendered triangular surface models, complex polylines and polygons, and lots of text. It needs to meet the following criteria; The number of vectors displayed is likely to be very large. For example a single surface triangle is likely to generate a number lines and

Raphael-GWT: fill image of a shape (Rect) appears offset. How to resolve this?

南笙酒味 提交于 2019-12-08 06:45:30
问题 I'm wondering about the behavior of {Shape}.attr("fill","url({image.path})") . when applying a fill image to a shape: public class AppMapCanvas extends Raphael { public AppMapCanvas(int width, int height) { super(width, height); this.hCenter = width / 2; this.vCenter = height / 2; ... Rect rect = this.new Rect(hCenter, vCenter, 144, 40, 4); rect.attr("fill", "url('../images/app-module-1-bg.png')"); // <-- ... } } The background image seem to teal accross the canvas behind the shape, thus gets

How to add image to Path in PaperJS

感情迁移 提交于 2019-12-08 02:13:46
问题 I am playing around with the nice code from http://paperjs.org/examples/candy-crash/. I want to replace the colors with an image so that instead of showing say a red circle, it should show a circle with an image inside. Here is the snippet I think I need to modify: function Ball(r, p, v) { this.radius = r; this.point = p; this.vector = v; this.maxVec = 15; this.numSegment = Math.floor(r / 3 + 2); this.boundOffset = []; this.boundOffsetBuff = []; this.sidePoints = []; this.path = new Path({