graphics

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

Circle in pixel grid

断了今生、忘了曾经 提交于 2019-12-23 12:56:28
问题 Given the center (x,y) and radius r , how one can draw a circle C((x,y),r) in pixel grid using python? It is fine to assume that pixel grid is large enough. 回答1: Here's the RosettaCode Midpoint circle algorithm in Python def circle(self, x0, y0, radius, colour=black): f = 1 - radius ddf_x = 1 ddf_y = -2 * radius x = 0 y = radius self.set(x0, y0 + radius, colour) self.set(x0, y0 - radius, colour) self.set(x0 + radius, y0, colour) self.set(x0 - radius, y0, colour) while x < y: if f >= 0: y -= 1

Changes to TBitmap do not appear in rendered image in Delphi 6 DirectShow filter and generates lots of soft page faults

这一生的挚爱 提交于 2019-12-23 12:55:11
问题 I have a Delphi6 DirectShow filter (push source video filter) written with the DSPACK component library. I am having a truly vexing problem with some simple code that modifies a bitmap before outputting the modified bitmap to the destination media sample in my FillBuffer() call. The code is shown below. As you can see it is just two simple loops that use a Byte pointer to traverse the RGB values in a 24-bit bitmap. This code worked fine when it was in a non-DirectShow test application.

Render an SVG with filter effects to PNG

夙愿已清 提交于 2019-12-23 12:44:52
问题 I would like to render an SVG I've created to a hi-res (600 DPI) PNG. This SVG has filter effects, specifically gaussian blur. Ideally rendering could be done via the command line. I know the SVG is renderable because you can open it in Chrome/Chromium and the output I'd like to see is there . Things I've tried: Importing to Adobe Illustrator svg2png Imagemagick Inkscape Other command-line tools and programs I'm forgetting right now. Basically anything you could find with Google. Current path

Implement API to wait for d3d10 commands to finish

China☆狼群 提交于 2019-12-23 12:35:24
问题 I am implementing some functionality which requires me to implement an API to wait for d3d10 to finish rendering.Basically i am trying to implement synchronize access to a shared texture such that i can update a texture after d3d10 is successfully able to present to backbuffer. By calling this black box api i think this can be achieved and i think it will be something similar like glfinish().I have read we can use ID3D10Query queries for implementing synchronize access. D3D10_QUERY_DESC

Java: JSplitPane duplicates top panel's contents to bottom panel when Timer is active

夙愿已清 提交于 2019-12-23 12:22:22
问题 So I have a JSplitPane, and two JPanels - one on top, one on the bottom. In both panels I overrode the paintComponent method and added my own graphics. In the bottom panel, I wanted to add an animation. When the panel does not repaint, it's fine, but as soon as the Timer (javax.swing.Timer) starts to call repaints, the bottom panel mimics the appearance of the top panel and glitches out. The actual animations are not refreshed, but rather it keeps on adding (like a dragged paintbrush instead

Is it possible to share an image on Android via a data URL?

谁都会走 提交于 2019-12-23 12:18:34
问题 Is it possible to share an image with code something like this? Intent share = new Intent(Intent.ACTION_SEND); share.setData(Uri.parse("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACx" + "jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGoSURBVDhPlVM9SEJRGD2DkL+QmoiKYNggToJL" + "4KKLNDiKW4NCoENQkzS1uboILoKjW61NSZOjo1uOBlHPgjJsuN3jvc+naVQHPt79vu+cc9/37n34" + "BQkd/0Jibw+3Ozt4j0TwwuCaNfYU5Qe43Tg5OMDD9TWEYUAIoYJr1mIxPEmjc01fh8uF03wer6vC" +

How to draw variable-width UIBezierPath?

跟風遠走 提交于 2019-12-23 12:14:03
问题 I'm wondering how I should go about drawing a uibezierpath where the stroke width peaks at the center of the arc. Here's an example of what I mean: Either I have to go through each point when drawing, and set the stroke width accordingly, or there's an easier way. Can anyone point me in the right direction? Thanks 回答1: You can just draw the two outer paths with no stroke, join them, and then fill in the space between them. 回答2: Another way to try this if you're interested: I ended up getting

Per-component alpha-channels with OpenGL?

。_饼干妹妹 提交于 2019-12-23 12:08:03
问题 Is it possible to perform blending with one alpha channel per component (one for red, one for green and one for blue) with OpenGL? If not, what are some possible workarounds? 回答1: This isn't something that's directly supported. It's fairly easy to achieve on your own though: Render your triangle (or whatever) using the 3-channel "alpha" texture and glBlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_COLOR) Enable multitexture and set the "alpha" texture to modulate your rgb texture Render your triangle

can anyone explain the FBX format for me?

六月ゝ 毕业季﹏ 提交于 2019-12-23 11:46:36
问题 i use notepad++ to see the data structure of FBX model but i have some problems understanding it. Here is some info of a cube(side = 10) located in (0,0,0), can anyone tell me what do these members mean? THANKS! Vertices: *24 { a: -5,-5,0,5,-5,0,-5,5,0,5,5,0,-5,-5,10,5,-5,10,-5,5,10,5,5,10 } PolygonVertexIndex: *36 { a: 0,2,-4,3,1,-1,4,5,-8,7,6,-5,0,1,-6,5,4,-1,1,3,-8,7,5,-2,3,2,-7,6,7,-4,2,0,-5,4,6,-3 } Edges: *18 { a: 0,1,2,3,4,6,7,8,9,10,13,14,16,19,20,25,26,32 } Normals: *108 { a: 0,0,-1