Questions tagged [vector-graphics]

Vector graphics is the use of geometrical primitives such as points, lines, curves, and shapes or polygon(s), which are all based on mathematical equations, to represent images in computer graphics. Images are drawn at run-time from the information stored, and so vector images do not get distorted after zoom/resize etc.

vector-graphics
Filter by
Sorted by
Tagged with
6 votes
1 answer
839 views

Drawing varying line widths with NSBezierPath?

I would like to create a vector object that can be drawn with a pen tablet and will honor the pressure information from the pen (by increasing/decreasing line width appropriately). Now I know how to ...
uliwitness's user avatar
  • 8,674
6 votes
1 answer
2k views

Design pattern for Vector Graphic Editor

What are the best practice design patterns/architectures for vector graphic applications like PowerPoint or Illustrator? Specifically for structuring tool-user interaction and action on complex ...
Alfa07's user avatar
  • 3,384
6 votes
2 answers
630 views

Color gradients in R in PDF and bitmap output

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 ...
January's user avatar
  • 16.7k
6 votes
2 answers
4k views

Can Android drawable's clip-path layer be rotated?

I've just starting using clip-paths in vector drawables. I want to rotate the clip-path, but it's not possible to rotate any path without it being in a group, so that it could have pivotX and pivotY ...
Aleksandar Stefanović's user avatar
6 votes
4 answers
5k views

Can a PDF be converted to a vector image format that can be printed from .NET?

We have a .NET app which prints to both real printers and PDF, currently using PDFsharp, although that part can be changed if there's a better option. Most of the output is generated text or images, ...
Bryce Wagner's user avatar
  • 2,660
6 votes
0 answers
1k views

Cannot load vector Drawable in bitmap in XML

This is my first code that loads a Vector-Drawable in layer-list. it works fine.Later I had to change color of my vector drawable. I find that I should add bitmap to use tint attribute. This is my ...
Mahdi's user avatar
  • 6,239
6 votes
2 answers
3k views

Auto Mirroring for RTL layout doesn't work in Android versions below 6.0

As you know Vector Drawables was added in Android Support Library 23.2 which announced in Android Developer Blog that for all versions of android we can use it instead of adding extra icons in ...
Nava's user avatar
  • 368
5 votes
4 answers
12k views

Cannot import svg with '<image>' tag

I have a png picture. I open it in Adobe Illustrator and save it as svg without changing default configuration: This gives me this svg file: <?xml version="1.0" encoding="utf-8"?> <!-- ...
Misagh Emamverdi's user avatar
5 votes
7 answers
2k views

How do I paint clouds?

I need an algorithm to paint clouds, or cloud like shapes. Obviously, I wouldn't want them all to be similar. What should I use to generate the relevant series of X,Y coordinates to paint the clouds? ...
Itay Moav -Malimovka's user avatar
5 votes
1 answer
6k views

Using a XAML vector image as a window icon

LearnWPF.com posted this article about converting bitmap images to XAML and using them in your applications. The outer element of the XAML image is a Canvas. However, the Window.Icon property only ...
Rob Sobers's user avatar
  • 20.9k
5 votes
1 answer
4k views

Android VectorDrawable doesn't show up in the layout

I created a SVG vector graphic (using CorelDraw X7), that looks like this: Then I used svg2android to convert it to VectorDrawable format. However, when I try to use it in the layout, it doesn't ...
Aleksandar Stefanović's user avatar
5 votes
2 answers
9k views

Algorithm to Fill In a Closed 2D Curve [closed]

I need to find a way of drawing the inside of a closed 2D curve. This curve is actually created using a bicubic Bezier curve, but that's not important I believe. At the moment there should be no "...
user18490's user avatar
  • 3,657
5 votes
2 answers
3k views

Android Adaptive icon foreground always too big

I have a problem and I don't know how to solve it. I am trying to make an adaptive android app icon. That's the code for it: <?xml version="1.0" encoding="utf-8"?> <...
Tschogge's user avatar
  • 106
5 votes
1 answer
6k views

Using PDFs for icon images in Xcode 7.2

I'm attempting to use PDF files as icons in an app I'm working on. The issue I'm encountering is I'm getting inconsistent tint colors. If I set a button image from interface builder, the icon image ...
Adrian's user avatar
  • 16.5k
5 votes
5 answers
3k views

Can the iPhone render vector graphics files directly? What formats are supported?

Is it possible to render a vector image file on the iPhone in the same way that one can render a bitmap (png, jpeg) file? I have tried eps and pdf files, neither of which seems to work – they are ...
Stephen's user avatar
  • 51
5 votes
3 answers
4k views

Convert/export graphics from Pov-Ray in 2D vector format

By default, Pov-Ray renders a bitmap file. Is there a way to convert or export the same image, in a vector format like eps, pdf, svg etc?
Cristi Stoica's user avatar
5 votes
2 answers
5k views

Menu item icon changes color

I've created a menu with a single item. <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:id=...
Demonic218's user avatar
5 votes
2 answers
2k views

Are vector graphics slower than bitmaps in Android?

I'm considering implementing vector graphics into my application, but I'm worried about the performance, since it seems natural that the vector graphics take more time to render themselves than (by ...
Aleksandar Stefanović's user avatar
5 votes
1 answer
6k views

RaphaelJS - I need help understanding a transform

I have a question about the following demo - http://raphaeljs.com/hand.html. Here is code from the sample... var r = Raphael("holder", 640, 480), angle = 0; while (angle < 360) { var color = ...
RDotLee's user avatar
  • 1,083
5 votes
1 answer
517 views

R: Generate coordinate data from user-drawn points?

I would like to add points manually to a plot (through mouse clicks) and then generate coordinate data from those points. Is there a package or a set of functions that would let me do this in R?
Mike Furlender's user avatar
5 votes
2 answers
12k views

Using vector icons in Android [closed]

To preface this: I have contemplated putting this on graphicdesgin.stackexchange.com but I came to the conclusion that my android specific questions might not be the best place for it. That is why I ...
EGHDK's user avatar
  • 18k
5 votes
2 answers
6k views

What are the pitfalls of using SVGZs instead of SVGs?

I recently started using svg images in my sites. Some of them are complex and quite big, so I've started compressing them. They compress really well. Why would one ever not use SVGZs (instead of the ...
user avatar
5 votes
2 answers
2k views

Converting webGL html to SVG

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 ...
gagan's user avatar
  • 125
5 votes
2 answers
2k views

paper.js union difference and intersection

I'm working on a project in paper.js where I need to create new paths based on the intersection, difference and union of two others. I did some digging and found the mathematical function that ...
Athan Clark's user avatar
  • 3,896
5 votes
3 answers
3k views

Boolean operations on a SVG pathstring

I've come to a conceptually difficult problem. In short, I need to find the vector path of two vector paths combined through different boolean operations. Such as the Union, the Difference, the ...
Ryan Allred's user avatar
5 votes
1 answer
2k views

Manipulating EPS/AI files in .NET

I am trying to automate the manipulation of Illustrator (EPS/AI) files. I need to automatically generate EPS files online and send them to a printer. I have a template AI file into which I want to ...
richie's user avatar
  • 1,086
5 votes
2 answers
7k views

How can I create EPS files in C#?

How can I create EPS files in C#? Are there any opensource libraries available or do I have to resort to the spec and do it by hand?
yoyoyoyosef's user avatar
  • 7,150
5 votes
3 answers
2k views

Exporting networkD3 graphs as vector graphics

Assume a network graph generated via the R library networkD3. Assume further that you can save that network graph as an external stand alone HTML file (see section Output) or, alternatively, render it ...
Michael Gruenstaeudl's user avatar
5 votes
1 answer
2k views

How to reuse vector images in wpf properly

X problem: I want to use vector graphic in WPF. I have bunch of SVG files, which I can convert into XAML by using Inkscape. Resulting xaml is ResourceDictionary with ViewBox / Canvas containing Path,...
Sinatr's user avatar
  • 21.5k
5 votes
1 answer
1k views

Python - PyGame - Learning vectors/animation

So, I'm not the most knowledgeable at math and was hoping to get some much needed feedback. My goal for starters is just to have an image chase my mouse. There are a few things happening that I didn'...
jtsmith1287's user avatar
  • 1,130
5 votes
3 answers
4k views

clip-path in Raphaël.js

How can I use clip-path with Raphaël.js like this example. It seams that Raphael.js has only clip-rect in it.
Artur Keyan's user avatar
  • 7,673
5 votes
1 answer
1k views

Can Cairo (the graphics library) be used to render mathematical formulas and pictures (latex style)?

Does it need any dependencies for full-fledged unicode character rendering, or can it read and render any platform's (Linux/Max/Windows) native font glyphs without much problems? Can it import/render ...
rubenvb's user avatar
  • 75.6k
5 votes
1 answer
2k views

How are filled paths rendered?

What are the standard algorithms used in vector graphics for rendering filled paths? I'm not only interested in the process of rendering strokes, I also would like to know how the shapes are filled - ...
zduny's user avatar
  • 2,511
5 votes
1 answer
4k views

Can someone explain the mat4.translate function from glMatrix?

Does anyone know why glmatrix ( 1.x ) defines mat4.translate like this: /** * Translates a matrix by the given vector * * @param {mat4} mat mat4 to translate * @param {vec3} vec vec3 specifying ...
Ray Hulha's user avatar
  • 11k
5 votes
1 answer
450 views

How to draw graph with disjoint edges?

I have adjacency matrix for graph. I need to vizualize this graph without intersecting edges. Vertex in the graph can be arranged randomly. I know one solution - enumeration of all edges for ...
mindw0rk's user avatar
  • 307
5 votes
1 answer
3k views

Drawing transform independent layout bounds in JavaFX

For a simple vector drawing app I am looking to implement a "Selection Box", that is a graphic representation of the layoutBounds of a Node. Example: Thanks to jewelsea and his BoundsExample, I have ...
Oliver Jan Krylow's user avatar
5 votes
1 answer
1k views

Pattern matching/recognition library for vectors (like OpenCV for image input)

Does anyone know a good pattern matching/recognition library in C++ (oss preferred) that is able to detect whether a list of vectors is an arrow or some other class? I already know OpenCV but this is ...
Beachwalker's user avatar
  • 7,815
5 votes
1 answer
584 views

Cropping an arbitrary wpf geometry

The background to my problem is that I have a bunch of geometries (huge amount, think map over a larger area) split across multiple wpf geometry instances (originally they were PathGeometry, but to ...
Isak Savo's user avatar
  • 35.5k
5 votes
1 answer
2k views

Firefox and Opera: SVG & background-size results in bad rendering

I have some elements on a page that use a SVG-file as a background image. It works well in Opera, Chrome and Safari, only Firefox renders the graphics really pixelated. I already did a search on ...
Sven's user avatar
  • 13.2k
5 votes
2 answers
1k views

html font/vector graphics question [closed]

what's the best way to present a vector/font in html?
Talima's user avatar
  • 51
5 votes
4 answers
4k views

How do I find hash value of a 3D vector?

I am trying to perform broad-phase collision detection with a fixed-grid size approach. Thus, for each entity's position: (x,y,z) (each of type float), I need to find which cell does the entity lie in....
brainydexter's user avatar
  • 20.1k
5 votes
0 answers
244 views

How to geometrically project 3D xyz vectors onto a plane orthogonal to the surface normals of a triangulated surface? R

I'm solving an equation with OLS which returns a timing point on an x/y/z surface mesh. I can solve for speed and directionality per the method outlined below. The problem is, my vectors are not ...
myfatson's user avatar
  • 416
5 votes
0 answers
555 views

Non linear transformation of svg in python

I want to do a non-linear transformation of a svg in python. My specific problem is to transform a rectangular svg image into a frustum like image, for which i have a mathematical equation of the form ...
Yash Gautam's user avatar
5 votes
0 answers
807 views

Vectorization of 1 bit Raster Images

I want to convert low-res, raster images that are composed of only two colors into a vector image. My current approach is simple. I use the Moore Contour tracing algorithm to "walk" around the edges ...
Scooter's user avatar
  • 1,069
5 votes
2 answers
6k views

Set Border/Stroke to Vector Drawable Programmatically

I can change the color of vector drawables programmatically, but I want to apply the stroke to vector drawable. I need a method that will change the vector drawable stroke at runtime: previously i ...
waqas's user avatar
  • 51
5 votes
1 answer
902 views

Bend SVG `<g>` around Curve

I'm using D3.js to draw some SVG <path>s in a straight line. All of these elements are contained in a <g> with the same vertical transformation. I'd like to "wrap" these elements around a ...
Randoms's user avatar
  • 2,120
4 votes
2 answers
15k views

Rendering vector shapes in Java

I have a series of shapes (Approx. 50), that each have 5 points, and a color (with alpha transparency). I want to render these shapes onto a pixel grid. I program as an amateur, so I have no idea how ...
user avatar
4 votes
2 answers
4k views

Is there a way to parse a vector path geometry in UWP in code behind?

When rendering vector graphics across different platforms, SVG and the SVG path format works really great. But at the moment its my challenge to realize this on the Universal Windows Platform. I've a ...
Christoph Meißner's user avatar
4 votes
4 answers
2k views

How do they draw the charts/graphs on stackoverflow?

I spent ages learning VML and creating charts for a website once, but since VML only works in Internet Explorer, it's not much good these days. I notice stackoverflow has graphs on my profile page, ...
Magnus Smith's user avatar
  • 5,935
4 votes
3 answers
21k views

Error importing Vector Asset into Android Studio

I created a simple play-button image in Illustrator, saved it as a SVG, used an online SVG-to-Drawable converter to create an xml of the file, and then tried using Android Studio's Vector Asset tool ...
Daniel Rust's user avatar

1 2 3
4
5
23