Kind of a weird question for you today. I was requested to take a IMAGE like the following (small portion of a rather big diagram)...
And make it into an editable diagram. I was wondering if there was anyway to decompose into PowerPoint shapes to be able to edit the lines, text, color of boxes, etc. The diagram was created in PowerPoint, then was created into a image, while the PowerPoint diagram was deleted.
Thanks for your time!
I had to do this exact thing for another reason. The closest I could get was to import the image into Photoshop or Adobe Acrobat. These programs can detect the text. Sometimes Acrobat detected text better, but to change the shapes it still had to go to Photoshop. Then, I put the text on its own layer. Next, I redrew the shapes on top of the original. Finally, I deleted the original image, leaving me with the text layers on top of the shape layers on top of a background layer(I prefer it to be alpha channel). Then any edits can be made as desired.
Related
I couldn't find an example of a block of text not rendered to a rectangular area.
Ideally, it would be nice if ID2D1HwndRenderTarget.DrawText() would let me provide a polygon Geometry instead of a rectangle.
I've tried adding a Direct2D Layer with contentBounds, thinking it might skip rendering text within those layers. It didn't work as expected, it just blocked render to the area still emulating text underneath.
I've also tried applying a rectangular area to hwnd window itself. It too blocked render but didn't shift text.
IDWriteTextLayout only supports rectangular layouts, but DirectWrite supports any shape you can think of by using the lower level functions (text analysis, glyph measurement, glyph shaping). It's no easy task to write your own text layout from scratch, but I wrote a Windows 7 SDK sample containing a "FlowLayout" that demonstrates a circle and a few other simple shapes. It doesn't take arbitrary geometry, but you may be able to adapt it to your needs (see FlowLayoutSource::GetNextRect for computing the width of each line).
https://github.com/pauldotknopf/WindowsSDK7-Samples/tree/master/multimedia/DirectWrite/CustomLayout
DirectWrite only supports rectangular layouts, so you can't get anything more complicated automatically. You'll have to implement layout functionality yourself if you want it to work differently. Clipping arguments, like you already observed, have nothing to do with text layout.
I Need to translate some graphical content into PowerPoint. I just imagined it would be really cool to make PowerPoint itself transparent, put the source Image "below" and then start copying the content with PowerPoint shapes. Like this:
Does such a Thing exist?
Draw a shape, make it about 50% transparent, then right-click on it and choose Format Shape. Then under Shape Options>Fill& Line, set the Fill Transparency to about 50%. Now right-click on the shape and choose Set as Default Shape.
Place the image to be replicated on the slide, then move it to the background. Draw transparent shapes on top. When you're all done, make the shapes opaque.
I am new in Unity2d creating animation via series of images of the player and images are very clear but when i add them in my animation they are getting distortion.
I am following this tutorial:
http://www.41post.com/4742/programming/unity-animated-texture-from-image-sequence-part-2
and it working perfectly for it's own images, Note: my images has empty spaces (as png pics has) and only that part of the images getting distortion while tutorial images has no empty spaces.
The Print Screen of my problem: Image sample
Didn't went through the entire tutorial line by line. What I suspect though is that you are overlapping your textures by just looking at the screenshot.
Imagine you are drawing pictures on the only piece of paper you have at hand. Suppose there are 1, 2, ..., k images, you draw the first image i1 on the piece of paper. Now, you wanna draw the second one i2. Since you have only one piece of paper, you have to rub away your previous drawing first. Without clearing the drawings on your paper, your new drawings will always overlap the old ones. Unless you are using a new piece of paper everytime, of course.
Back to the question. If the images used in the animation are fully opaque (not even a single pixel), then of course you will not notice the difference even if you draw new paintings over the old ones. But in your case, there are many transparent areas in the images. If the canvas is not cleaned everytime before drawing a new painting, it is obvious that the results will be something similar to what you have in the screenshot.
The images used in the tutorial are fully opaque, I suppose.
I want to use multiple irregular picture makes up a map, each picture is a button.Transparent part of the images will overwrite each other, how should I do to make their control areas does not overlap.
I use a lot of pictures makes up a large map.
And each piece of the map is irregular, but their control area is a rectangle. Because they all have transparent pixels.
I just want to make the hit area and their shape becomes the same.Some encountered a similar problem?
I have implemented one for the cocos2d-x v3.x:
https://github.com/yszheda/cocos2d-x-irregular-button
It works OK on cocos2d-x v3.2. Maybe you can have a try XD
How to erase line from image (for example CIImage or NSImage or bitmap) by painting it? Just like eraser. I wonder how to do that with Core Graphics?
This is definitely a dupe (I even answered the dupe!) but I cant find it at the moment due to the phone searching being a little fiddly. So, apologies for that, here is the gist of the other answer:
You can do this, assuming your lines are drawn on a separate, equally sized view on top of the image view, by setting the drawing colour to colorWithPatternImage:, using the image view image. Lines drawn with this colour "erase" whatever was previously on the view by effectively drawing small sections of the underlying image on top of your existing drawn lines.