I'm trying to make an Alphabet Tracing App Logic is Almost clear
1- I made proper path using Custom Clipper so user can only touch inside the Path
2- I made Custom Paint as child of Custom Clipper so user can draw inside it
3- But there is an issue in this logic user can draw in whole Alphabet but requirements are slightly different. I want to draw some portion first and other portion after that how can I do that any Idea ? For Reference I am Uploading an Image you can check it as well
Related
I have the following svg image (each circle has a different path)
and my app contains 5 classes,
I want to include it in my app so that when the user clicks on any circle, it goes to another page (navigate to new class) and each circle has a different class than the other
How can this be done in Flutter?
This might be a workaround if there is another way but my first thought is to put your SVG image into a stack widget and place Positioned gesturedetectors over each circle area. Then point each Gesturedetector to each class you have.
There might be more elegant ways to go about it but this might get you going till you have a better solution
I am trying To make a smart board that allows the user to draw just inside the Alphabet Letters which is a PNG image and Following a certain pattern as shown in the image and I got stuck trying to figure it out I tried using flutter_painter package But the painting still goes on top of the image and it did not work for me so I need some help!!.
Arabic Letter A
I want to Draw lines from one object to another object. Like a Matching object game. I want Swift language with UIKit Use. Here I attach the Sample Screenshot.
Does anyone have experience with this? then please help me.
You have a couple of choices.
You can create a custom subclass of UIView that implements the draw(_:) function to draw custom content. That view would need to big enough to enclose all of your custom drawing. You'd fill most of the view with clear, and then draw the lines you want using Core Graphics.
The other option is to use Core Animation layers. You could add a CAShapeLayer to your view's layer, set up the shape layer with the desired line thickness and color, and add a path to the layer containing the lines you want to draw. (Note that if you use CAShapeLayers, all the lines drawn in a single shape layer will be the same color. You'll need multiple shape layers in order to draw in multiple colors.)
Both approaches will require some research. Shape layers are more efficient and take better advantage of the graphics hardware on iOS devices, but using them has a fairly steep learning curve.
You should be able to google examples of both approaches. Try search phrases like "Custom drawing in a UIView" and "drawing with CAShapeLayer". I wrote a little demo app called OvalView that demonstrates how to create a UIView subclass that manages a shape layer.
Edit:
I adapted the code from my sample app into a demo called LinesBetweenViews. The new demo has a custom UIView that draws lines between any pairs of subviews you put into it.
Here is a screenshot of the demo:
If you answer my questions I can upload the demo app to Github so you can look at it.
Edit #2
See this Github repo for a sample project that draws lines between pairs of subviews.
I'm trying to create segmented parts of an image... like the top right square of an image can be highlighted or clicked on while the rest of the image isn't. I tried to google this stuff and I found codes related to container but I'm not sure if that's what I want.. How can I make parts of image segmented so I can fire events on mouseover/mouseselect etc...
You could either define a hitArea (http://www.createjs.com/Docs/EaselJS/classes/DisplayObject.html#property_hitArea) if your image only requires one segment or if you want multiple clickeable areas on one image: Split up the image through using multiple Shapes via beginnBitmapFill (an example for bitmapFill can be found here: http://jsfiddle.net/lannymcnie/nmLhu/) and then put the listeners on the individual shapes.
I am new to iPhone application development and currently working on a simple paint application for iPhone. I use GLPaint source code to start with. I tried to change the brush size using the following ways.
I created a UIViewController class and linked it to GLPaint.PaintingView and added different buttons to indicate different brush size.
Tried to dynamically pass images with different images. But initWithCoder was called only when the paint view loads and so the brush image #"Particle.png" is not getting changed
Tried extracting the logic in initWithCoder to another method that takes in brush string as parameter. So that I could call the extracted method while selecting a brush button. Since the brush buttons are in another View/Viewcontroller, the change in image is not applied.
Is there any method to change the brush size just like "(void)setBrushColorWithRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue" that changes color?
Any help will be very much useful. Thank you.
Did you try changing kBrushSize - which is used in call to glPointSize() in -initWithCoder: ?