vector-graphics

Generate vector EMF/WMF (Windows Metafile) clipboard content from Qt 4.5

China☆狼群 提交于 2019-12-24 12:20:03
问题 We are moving a large codebase from GDI to QPainter. One thing we used to get on Windows easily was the EMF clipboard format, which enabled customers to manipulate their pasted output in other programs (like Office) in a vector format. It's easy for us to produce bitmaps from Qt into EMF, but that really doesn't give us back the editability of the old format. We can also make mime data from Postscript, which in some programs will retain vector format, but won't allow editability in Office,

How to calculate Azimuth & Elevation of objects relative to camera using cam quaternion …?

依然范特西╮ 提交于 2019-12-24 09:42:33
问题 I have a camera quaternion (a,b,c,d) and a cam position (camX, camY, camZ) I have an object with 3d coordinates (x,y,z) I need to calculate azimuth, elevation of objects relatively to the cam view direction & plane. First question If I put the object in center of my view, f I rotate the cam, translate it, I should have the same azimuth value, right ?? I don't have that. Second question, the calculation. I'm doing object coordinates - cam position, in order to translate the object to the cam.

Is it really necessary to provide all the different app icon sizes for an iOS app?

大憨熊 提交于 2019-12-23 17:22:39
问题 I'm tempted to provide the highest resolution icon and let iOS scale it down as necessary. Is this a bad idea, and (if so) why? 回答1: Yes, it might be bad idea. If your icon art was produced using a vector image editor (e.g., Adobe Illustrator, Adobe Photoshop with vector primitives, Sketch, etc) you best bet is to export all required resolutions yourself. In doing so, you will guarantee the best possible output for each resolution. Keep in mind that exporting a single high resolution image

SVG fine in browsers but broken (just shows a black box) in Illustrator or InkScape [closed]

 ̄綄美尐妖づ 提交于 2019-12-23 13:09:16
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I've got an issue with SVG files generated by a program. They validate fine, display fine in browsers and in OS X Preview, but display as a big black box in Illustrator or InkScape or various other programs. I suspect there's something to do with transparency or a tag not being supported or something, but I don

Java: drawing scaled objects (buffered image and vector graphics)

和自甴很熟 提交于 2019-12-23 04:57:23
问题 I would like to draw scaled objects containing raster as well as vector data. Currently, I am drawing into a scaled Graphics2D object protected void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2d = (Graphics2D) g.create(); //Get transformation, apply scale and shifts at = g2d.getTransform(); at.translate(x, y); at.scale(zoom, zoom); //Transform Graphics2D object g2d.setTransform(at); //Draw buffered image into the transformed object g2d.drawImage(img, 0, 0, this); //Draw

Ball collision problems

雨燕双飞 提交于 2019-12-23 04:28:09
问题 So I have a system with colliding balls that generally works, except for when they collide with similar directions, less than 90 degrees apart. This is because the ball above tries to collide against the yellow line which is supposedly the collision plane, but it sends it off the wrong direction, and it "follows" the other ball. The general algorithm for the collision is: dot = direction.surface; parallel = surface * dot; perpendicular = direction - parallel; direction = perpendicular -

Animating a counter-clockwise arc in raphael.js

爱⌒轻易说出口 提交于 2019-12-23 04:06:16
问题 I got the exact arc animation I need from the thread drawing centered arcs in raphael js However, I need another instance of this arc drawn counter-clockwise, while this one only seems to be clockwise. Is it possible for this arc to be drawn and animated counter-clockwise? code snippet from the answered question: // Custom Arc Attribute, position x&y, value portion of total, total value, Radius var archtype = Raphael("canvas", 200, 100); archtype.customAttributes.arc = function (xloc, yloc,

Converting webGL html to SVG

夙愿已清 提交于 2019-12-22 10:57:40
问题 I am using R, with the misc3d and rpanel libraries, to create a 3d image in webGL. I then need to embed the image into a PDF via Latex. The 3d image renders fine and looks great - but I'm thinking I need to convert the webGL HTML file into an SVG or some other kind of vector graphics file which can be embedded in Latex. Any suggestions on how to accomplish this? 回答1: Maybe I am wrong but this way doesn't make sense to me. You have 3D coordinates You render objects based on 3D coordinates to a

Color gradients in R in PDF and bitmap output

你说的曾经没有我的故事 提交于 2019-12-22 05:33:55
问题 I am struggling to get a visually acceptable color gradient in R (see here for a detailed description of my particular case). The problem, in short, is that while output in the R window looks OK, PDFs show thin, white lines between segments used to generate the gradient. n <- 100 cc <- colorRampPalette(c("red", "blue"))(n) plot.new() par(mar=rep(0,4)) sapply(1:n, function(i) rect((i-1)/n, 0, i/n, 1, col=cc[i], border=NA)) dev.copy2pdf(file="test.pdf") Here is the result: You can see the thin,

How to use xaml vector images as image source in Windows 8 app

雨燕双飞 提交于 2019-12-21 08:21:12
问题 I created some assets in inkscape and would like to use them as icons in a windows 8 application. I have done some reading and it seams that while .Net 4.5 supports SVG, the modern ui profile does not. I converted the svg to xaml using this tool. I get the following xaml. <Canvas xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="svg2997" Width="744.09448" Height="1052.3622" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> <Canvas x:Name="layer1"> <Path Fill="