iPhone App Brush effects (Based on GLPaint) [duplicate] - ios

I am working on a drawing application based on GLPaint code. Do somebody know how to get an effect like this ? I have tried with different values for the width and the Height for the brush, but still it remains same .
Do i need to consider glBlendFunc() ? or Is it achievable thorough changing the width and the heigh of the brush.
Thanks in advance.

The easiest way to achieve that type of effect is to reducing the alpha from 1.0 to 0.7.

In PaintingView Change Brush Height and Width as shown in following image...And One more thing is that change brush image according to your requirements for more color custom effect..
Hope, this will help you..

Related

Need clarification on Alignment Rects in iOS

I am having trouble understanding what an Alignment Rect is and looks like in iOS? The post Difference between Frame Rectangle and Alignment Rectangle is confusing. For Example, I don't know what the blue square is supposed to represent? a button? a label? a view container?
Can someone please explain this in layman's terms with visual aides. I am new to iOS. Thanks in advance. :)

how to increase text label size using rectangle in ios?

i want to increase label size using rectangular bound like it show in this picture.
can any one tell me how to do this. thanks in advance.
subclassing textview fixed it.

Center-aligned masked UIImageView / Imitating Twitter & Facebook app's image views

Post title can be a little bit weird but here's what I'm looking forward to do:
Look at the image in the middle, it's displaying only a part of the original image. It's still high definition, not really cropped but only masked with the center of the image at the center of the view.
So basically they put a bigger image behind a smaller view (I did that for having circular imageviews in the past). But how can I achieve that particularly?
Is there any cocoapods or something to do so or should I get started doing it myself? Any suggestions on how to code-wisely build this?
The main goal here is to keep a static space to display images so they're always the same width/height. Doing this effect seems like a good way of achieving this.
EDIT: Here's a little sketch of an idea I just had to mimic that behavior:
Thanks a lot and have a nice day.
If you're asking what I think you're asking, you don't have to look far to find this functionality. Use UIView's built in contentMode property, specifically in this case, UIViewContentModeScaleAspectFill.
[imageView setContentMode:UIViewContentModeScaleAspectFill];
Then to crop of the parts of the image extending out of the frame, be sure to use clipsToBounds:
[imageView setClipsToBounds:YES];
Here is another solution, but make sure your image width and height is greater than the imageview,
imageView.contentMode=UIViewContentModeCenter;
imageView.clipsToBounds=YES;
imageView.clearsContextBeforeDrawing=NO;

Prob when rotating an uiimageview

When I am working with uiimageview, I want to rotate it with a small angle, and I did. But, in the border of uiimageview after rotating appears spikes, like a saw. I do not know why and try to fix it but I cant. Please help me.
Couple of options..
1) If you are using Core Graphics functions to rotate you can enable anti alias options
CGContextSetAllowsAntialiasing(context, true);
CGContextSetShouldAntialias(context, true);
2) Add a 1 pixel transparent border to the your image on all 4 sides.
One more thing, there is a technical term to the spikes you saw and it is aliasing. And the techniques to prevent aliasing are called anti aliasing techniques. Hope this helps.
Thanks all you guys :) My friend showed me another way to fix it. I think this way is better than using transparent border trick. He changed an attribute in info plist file, that is "Renders with edge antialisasing", to YES. And everything becomes okay :). I hope it will help someone get a same prob with me :)
Take a UIView as subView and Place UIImageView on subView.
Keep the size of subView and UIImageView Same.
Now, Use "UIViewAnimationTransitionFlipFromRight" or "UIViewAnimationTransitionFlipFromLeft" with Timer.
What you can do easily is to add a 1px transparent border around your image. So if your image is, let's say, 50x50 pixels you need to make it 52x52 such that the outer pixels are transparent. When you will rotate it should look fine now.

Blackberry glossy tabbar

I have a tab bar in my application, however I'm trying to attain a glossy effect like the one featured in the Rhapsody Blackberry app or the Flixster Blackberry app. I've thought about using a PNG, but I'm sure theres a better way to do it programmatically like using a gradient. Any help would be much appreciated!
Flixster app
http://news.cnet.com/i/bto/20091106/Flixter_Curve.png
Rhapsody app (I would prefer to have it look like this)
http://nexus404.com/Blog/wp-content/uploads2/2010/12/blackberry-for-rhapsody-300.jpg
Thanks!
it is indeed possible.
Create a 1 pixelx40pixel (height as much as you want) png image of a gradient which is glossy so we get the glossy effect.
in paint() call graphics.tileRop() passing in Graphics.ROP_SRC_COPY as the Constant for the raster operation to execute.
This will draw the gradient to the extent of the region you set to.
The best way is use PNG for that. If you try to paint gradient programmatically be ready to see non-smooth gradient with visible color lines.

Resources