@Override public Pattern createPattern(boolean repeatX, boolean repeatY) { if (image == null) throw new IllegalStateException("Can't create pattern from un-ready image."); // this is a circuitous route, but I'm not savvy enough to find a more direct one return new RoboPattern(UIColor.fromPatternImage(toUIImage()).getCGColor(), repeatX, repeatY); }
@Override public Pattern toPattern() { // this is a circuitous route, but I'm not savvy enough to find a more direct one return new RoboPattern(this, UIColor.fromPatternImage(new UIImage(cgImage())).getCGColor(), repeatX, repeatY); }
@Override protected Pattern toSubPattern(AbstractImageGL<?> image, boolean repeatX, boolean repeatY, float x, float y, float width, float height) { // this is a circuitous route, but I'm not savvy enough to find a more direct one CGImage subImage = CGImage.createWithImageInRect(cgImage(), new CGRect(x, y, width, height)); return new RoboPattern(image, UIColor.fromPatternImage(new UIImage(subImage)).getCGColor(), repeatX, repeatY); }
context.setFillColor(color.getCGColor()); } else { context.setGrayFillColor(0, 0.8);
context.setStrokeColor(lineColor.getCGColor()); context.setFillColor(progressRemainingColor.getCGColor()); context.strokePath(); context.setFillColor(progressColor.getCGColor()); radius = radius - 2; double amount = progress * rect.getWidth();