IText edit or remove the layer on PDF

As it turned out in comments, the layers in question are what iText indeed calls layers but what actually in PDF lingo is called optional content groups. There indeed is a utility class for removing such layers in the iText Xtra package (not the extrajars, but itext-xtra.jar): com.itextpdf.text.pdf.ocg.OCGRemover which makes use of the class OCGParser … Read more

How to maintain multi layers of ImageViews and keep their aspect ratio based on the largest one?

this is a class that displays an image with additional layers: import java.util.ArrayList; import java.util.Iterator; import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Rect; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.view.animation.Transformation; import android.widget.ImageView; public class LayeredImageView extends … Read more

html5 – canvas element – Multiple layers

No, however, you could layer multiple <canvas> elements on top of each other and accomplish something similar. <div style=”position: relative;”> <canvas id=”layer1″ width=”100″ height=”100″ style=”position: absolute; left: 0; top: 0; z-index: 0;”></canvas> <canvas id=”layer2″ width=”100″ height=”100″ style=”position: absolute; left: 0; top: 0; z-index: 1;”></canvas> </div> Draw your first layer on the layer1 canvas, and the … Read more

Giving UIView rounded corners

Try this #import <QuartzCore/QuartzCore.h> // not necessary for 10 years now 🙂 … view.layer.cornerRadius = 5; view.layer.masksToBounds = true; Note: If you are trying to apply rounded corners to a UIViewController‘s view, it should not be applied in the view controller’s constructor, but rather in -viewDidLoad, after view is actually instantiated.

Click through div to underlying elements

Yes, you CAN do this. Using pointer-events: none along with CSS conditional statements for IE11 (does not work in IE10 or below), you can get a cross browser compatible solution for this problem. Using AlphaImageLoader, you can even put transparent .PNG/.GIFs in the overlay div and have clicks flow through to elements underneath. CSS: pointer-events: … Read more