Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm looking for anything that could guide me on implementing long shadows drawing on runtime using Core Graphics or other available framework in iOS SDK. The screenshot below presents how I imagine the shadows:
I have already done some research, I didn't found any libraries that could provide this or similar features. However I found that video on youtube: http://www.youtube.com/watch?v=zS7ZjFZ-0lk presenting something I would be really pleased with. Unfortunately I was unable to contact the author or get more informations about the implementation.
I have wrote some tests and achieved some results, in fact the screenshot above was taken from my test application. To make it simpler it displays png image with transparency using UIImageView, then it creates another UIImageView, inserts it below the main view and draws shadow to it. But still this is not something that could be used in real life. My approach was to draw shadow multiple times with different offset. The problem is that solution have some cons. To keep performance hight, the graphics context I am drawing to is converted to UIImage and added to the view. That makes my shadows not as dynamic as I would like them to be (applied once, are static). The second major problem with multiple shadows is that they overlap each other, so using alpha channel transparency gives poor effects. No problem when using opaque shadows (for example from black to white), but that makes my solution even less usable (because this kind of fake shadows looks good only when drawing on plain color backgrounds). Any help would be appreciated.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I just want to have my subject talk into the phone and display the volume on the screen.
Any recommendations for an approach?
Thanks.
You can check SFGaugeView :
SFGaugeView
A custom UIView with a gauge control (tachometer like control).
This one "Detects swipe gesture and sets the needle/level appropriately.", but with a bit of work you will be able to disable that.
You could use LARSBar :
LARSBar
A UISlider subclass mimicking the awesome EQ slider found on Twitter's #music app.
If you need more precise help, tell us what you tried, what is working and what isn't.
Do you need help to get the level input in the mic ? Help to draw the view ? Be more precise.
Please see https://github.com/ChiefPilot/F3BarGauge
From their description:
This control is intended to replicate/simulate the level indicator on an audio mixing board. These indicators are usually segmented/stacked LEDs, with several colors to indicate thresholds. This control replicates that look, using Quartz drawing primitives, and auto-adjusts to horizontal or vertical orientation. Additionally, the colors, number of bars, peak hold, and other items are easily customized.
Apple also has some sample code that can be used to get you started: avTouch
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I want to display audio meters on the iPad consisting of many small green, red or black rectangles. They don't need to be fancy but there may be a lot of them. I am looking for the best technique to draw them quickly. Which of the following techniques is better: text atlas in CALayers or OpenGLES or another?
Thank you for your answers before the the question was closed for being too broad. Unfortunately I couldn't make the question narrow because I didn't know which technology to use. If I had known the answer I could have made the question very narrow.
The fastest drawing would be to use OpenGLES in a custom view.
An alternative method would be to use a texture atlas in CALayers. You could draw 9 sets of your boxes into a single image to start with (0-8 boxes on), and then create the 300 CALayers on screen all using that as their content. During each frame, you switch each layer to point at the part of the texture atlas it needs to use. I've never done this with 300 layers before, so I don't know if that may become a problem - I've only done it with a half dozen or so digits that were updating every frame, but that worked really well. See this blog post for more info:
http://supermegaultragroovy.com/2012/11/19/pragma-mark-calayer-texture-atlases/
The best way to draw something repeatedly is to avoid drawing it if it is already on the screen. Since audio meters tend to update frequently, but most of their area stay the same, because audio signals are relatively smooth, you should track what's drawn, and draw only the differences.
For example, if you have drawn a signal meter with fifty green squares in a previous update, and now you need to draw forty eight green squares, you should redraw only the two squares that are different from the previous update. This should save you a lot of quartz calls.
Postpone rendering to the point where it's absolutely necessary, i. e. assuming you're drawing with CoreGraphics, use paths, and only stroke/fill the path when you have added all the rectangles to it.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
So, my background is in the color #DBDBDB. I need an animated loading image like this one for my site's background. Unfortunately since GIFs don't support partial transparency, I'm left with a white outline in my background. I've tried to take this image and edit it to use the same background color to no avail. Then I tried to make a loading animation of my own but that came out horrible. So I do not know what to do. Can anyone help me? I would like to use this image but instead of a white outline, I would like an outline in the color #DBDBDB or a background #DBDBDB
Or to be told how to do this in CS5.5
You can use the wonderful little service AjaxLoad to generate a loading animation for any combination of colors. Just pick #DBDBDB as the background color and use "Indicator Big" as your style.
Here's your image:
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have an iphone app with a picture of a face in the uiimage. I want to only change the eye color on the face by tapping on a button or tapping on a color wheel. Can you give me some help in what code I would need.
I would suggest taking a look at OpenCV. It works quite well on iOS devices, the main code comes with examples on how to build iOS applications and there is a lot of material on how to do eye detection and from there you should be able to change the colors.
Keep in mind this is not a simple task and you could accomplish with a easier thing. But you could learn a lot and there are tons of good resources around this topics.
If you want to do something faster, you might be able to just detect the touch on the UIView(enable user interaction) and present a color picker, after the color has been presented you could create a simple view on top of the image that has a circle with the color that was selected. It would be crappy, but might be a good idea to do a simple simple prototype.
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 10 years ago.
Improve this question
I am using Inkscape and I know how to use transparency within the image, but I am annoyed that the background of the workspace in Inkscape is white. I searched through a lot of settings, but had no luck.
How do I get the workspace checkered like in GIMP?
The white workspace is really bothersome if you design something in white
You can change the background color in Inkscape by changing the document properties (in the File menu).
In particular, you can check 'Checkerboard background' to show the checkerboard if the background is set to transparent.
A quite ugly solution is to design your own checker background and have it as locked bottom layer :) Im doing something similar when im fiddling around with iOS icons or items that will be on a background.
Also as Juve mention you could try out the grids property.
First of all, a hint on transparency. If you export images with transparency for example to PDF (for printing), they are converted to bitmaps inside the PDF or produce unwanted results. Export to non-vector formats should be fine. I suggest to avoid transparency, usually there is a way to mimic transparency, e.g., by just using a light gray for shadows. Also don't use blur effects; similar problems with PDF export.
Now to the checkboard:
It's not possible, one workaround would be to add full page sized box and choose black checker board as fill. Put this box on a separate layer and lock the layer. You might also lighten that box up using one of the filters. Unfortunately this board won't adapt when zooming.
Maybe not the solution, but a related option would be the grid (press #). This is not behind your drawing but in front. It can help you with positioning. Maybe you were looking for this?