paint

2013, Existing package for drawing (painting, brush, lines) in iOS?

﹥>﹥吖頭↗ 提交于 2019-11-29 03:57:32
问题 I need to add typical finger drawing to an app. (The usual.... choose colors, erase, thickness - just the usual you see in every app made.) It's hard to believe I have to program this from scratch, in this day and age? It's hard to believe there is not a common solution for this? All I could find is... https://github.com/levinunnink/Smooth-Line-View Review : that is a (beautifully written) example fragment of a few lines of code being how to draw with a path, with a good smooth result. It

Reverse Engineering old paint programs

徘徊边缘 提交于 2019-11-29 03:45:48
I've got a couple of really old MSDos based paint programs. They work on palette indexed image buffers. They have a number of spectacular shape drawing tools, brushes and effects that simply do not exist in any modern paint program- Particularly not whilst staying within the "bounds" of a low color palette indexed image. I would like to reproduce many of these wonderful tools in a modern program, to perhaps make them more accessible to myself and the general public again, without having to boot up an emulator like dosbox. But I have a problem. While a lot of these brushes and tools and things

Android FingerPaint Undo/Redo implementation

耗尽温柔 提交于 2019-11-29 01:04:01
问题 I'm working on a test project which is something similar to FingerPaint example in Android SDK Demos. I was trying to implement undo/redo functionality in my project,but the things that I tried didn't work as I expect. I find some questions similar to this over internet and here,but they didn't help me, that's why I'm asking a new question. Here is some idea what I'm doing actually : public class MyView extends View { //private static final float MINP = 0.25f; //private static final float

Android: How to fill color to the specific part of the Image only? [duplicate]

懵懂的女人 提交于 2019-11-29 00:21:21
This question already has an answer here: how to fill color in image in particular area? 4 answers I have Image Like this: Now, i want to fill the color to the Specific part of that image. as like If i select color blue and if i touch on Cap then the cap should be fill with the color Blue. Same thing should be also happen with the other part like nose, Mouth, Eyes etc So, How it is possible using android ? Can any budy help me please. Updated I have try with the implementation of the FloodFill algorithm in my app. See Here But after doing that i got exception like: 03-09 17:45:16.260: ERROR

Writing a paint program à la MS Paint - how to interpolate between mouse move events?

倾然丶 夕夏残阳落幕 提交于 2019-11-28 21:37:16
I want to write a paint program in the style of MS Paint. For painting things on screen when the user moves the mouse, I have to wait for mouse move events and draw on the screen whenever I receive one. Apparently, mose move events are not sent very often, so I have to interpolate the mouse movement by drawing a line between the current mouse position and the previous one. In pseudocode, this looks something like this: var positionOld = null def handleMouseMove(positionNew): if mouse.button.down: if positionOld == null: positionOld = positionNew screen.draw.line(positionOld,positionNew)

How to create MS Paint clone with Python and pygame

偶尔善良 提交于 2019-11-28 18:27:01
As I see it, there are two ways to handle mouse events to draw a picture. The first is to detect when the mouse moves and draw a line to where the mouse is, shown here . However, the problem with this is that with a large brush size, many gaps appear between each "line" that is not straight since it is using the line's stroke size to create thick lines. The other way is to draw circles when the mouse moves as is shown here . The problem with this is that gaps appear between each circle if the mouse moves faster than the computer detects mouse input. Here's a screenshot with my issues with both

Android Edit Bitmap Channels

对着背影说爱祢 提交于 2019-11-28 16:26:30
It's possible to access the alpha channel of a given bitmap with extractAlpha() , but I haven't been able to find any way to actually set the alpha channel of a bitmap. How can multiple greyscale images be recombined as channels into a Bitmap with Android? It is quite possible to re-combine separate channels back into an ARGB image. You just need the grayscale channel images and an image with the alpha channel you want - note that this is not an opaque grayscale image, but an image with the alpha you want. You then draw each channel with a Paint using the appropriate PorterDuffXfermode onto a

How to prevent Android's drawBitmap from only drawing black images?

╄→гoц情女王★ 提交于 2019-11-28 16:01:21
As per the original question , The end result is a rounded-rect png in an ImageView with a natural looking drop shadow. I have the shadow working, but when it draws, it makes the entire image black. How can I prevent the original image (definitely not black) from being black when adding the shadow? BlurMaskFilter blurFilter = new BlurMaskFilter(2, BlurMaskFilter.Blur.OUTER); Paint shadowPaint = new Paint(); shadowPaint.setMaskFilter(blurFilter); int[] offsetXY = new int[2]; Bitmap originalBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.pier_t); Bitmap shadowImage =

Dynamically generated line with glow effective

我们两清 提交于 2019-11-28 16:00:05
I want to draw line with glow effect like this The problem - i must generate this line in program in dependence on user's interaction ( the form of line will be generated in onTouchEvent - ACTION_MOVE ). Can i generate this effect without xml files or drawing premaid bitmap ? sharl I imitate this effect in this way : Draw line with BlurMaskFilter ; Draw over it normal line. I use Path class to generate line and save coordinates of MOVE_ACTION event to generate only part of path what i need. Create 2 Paint() s: _paintSimple = new Paint(); _paintSimple.setAntiAlias(true); _paintSimple.setDither

How did this person code “Hello World” with Microsoft Paint?

旧城冷巷雨未停 提交于 2019-11-28 15:05:37
I have just seen this within the past few days and cannot figure out how it works. The video I talk about is here : It's the top rated answer from this Stack Overflow question: Why was this program rejected by three compilers? How is this bitmap able to show a C++ program for "Hello World"? A BMP (DIB) image is composed by a header followed by uncompressed 1 color data (for 24 bpp images it's 3 bytes per pixel, stored in reverse row order and with 4 bytes row stride). The bytes for color data are used to represent colors (i.e. none of them are "mandated" by the file format 2 , they all come