本文整理汇总了Java中org.robovm.apple.coregraphics.CGRect.Zero方法的典型用法代码示例。如果您正苦于以下问题:Java CGRect.Zero方法的具体用法?Java CGRect.Zero怎么用?Java CGRect.Zero使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.robovm.apple.coregraphics.CGRect
的用法示例。
在下文中一共展示了CGRect.Zero方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawInContext
import org.robovm.apple.coregraphics.CGRect; //导入方法依赖的package包/类
public void drawInContext(CGContext context) {
BitmapDrawableConstantState state = this.internalConstantState;
CGRect containerRect = this.getBounds();
CGRect dstRect = CGRect.Zero();
UIImage image = state.getImage();
Gravity.applyGravity(state.getGravity(), image.getSize().getWidth(), image.getSize().getHeight(), containerRect, dstRect);
if(scaledImageCache == null) {
//self.scaledImageCache = [self resizeImage:image toWidth:dstRect.size.width height:dstRect.size.height];
}
UIGraphics.pushContext(context);
//[self.scaledImageCache drawInRect:dstRect];
image.draw(dstRect);
UIGraphics.popContext();
}
示例2: setContentSize
import org.robovm.apple.coregraphics.CGRect; //导入方法依赖的package包/类
private CGRect setContentSize(UITextView textView, UIScrollView scrollView) {
CGRect currentRect = getSize(textView.getText());
if (previousRect != CGRect.Zero()) {
if (currentRect != previousRect) {
textView.setFrame(currentRect);
scrollView.setContentSize(currentRect.getSize());
}
}
return currentRect;
}
示例3: CollectionViewCell
import org.robovm.apple.coregraphics.CGRect; //导入方法依赖的package包/类
public CollectionViewCell(String resource) {
super(CGRect.Zero());
LayoutBridge bridge = new LayoutBridge(getContentView().getBounds());
bridge.setAutoresizingMask(UIViewAutoresizing.FlexibleWidth.set(UIViewAutoresizing.FlexibleHeight));
getContentView().addSubview(bridge);
getContentView().setTranslatesAutoresizingMaskIntoConstraints(true);
LayoutInflater inflater = new LayoutInflater();
inflater.inflate(resource, bridge, true);
layoutBridge = bridge;
}
示例4: drawInContext
import org.robovm.apple.coregraphics.CGRect; //导入方法依赖的package包/类
public void drawInContext(CGContext context) {
int level = this.getLevel();
if(level > 0) {
ClipDrawableConstantState state = internalConstantState;
ClipDrawableOrientation orientation = state.getOrientation();
CGRect r = CGRect.Zero();
CGRect bounds = this.getBounds();
double w = bounds.getSize().getWidth();
double iw = 0; //mClipState.mDrawable.getIntrinsicWidth();
if(orientation == ClipDrawableOrientation.Horizontal) {
w -= (w - iw) * (10000 - level) / 10000;
}
double h = bounds.getSize().getHeight();
double ih = 0; //mClipState.mDrawable.getIntrinsicHeight();
if(orientation == ClipDrawableOrientation.Vertical) {
h -= (h - ih) * (10000 - level) / 10000;
}
Gravity.applyGravity(state.getGravity(), w, h, bounds, r);
if(w > 0 && h > 0) {
context.saveGState();
context.clipToRect(r);
state.getDrawable().drawInContext(context);
context.restoreGState();
}
}
}
示例5: createViewWithText
import org.robovm.apple.coregraphics.CGRect; //导入方法依赖的package包/类
private TextView createViewWithText(String text) {
TextView view = new TextView(CGRect.Zero());
view.setText(text);
LinearLayoutLayoutParams layoutParams = new LinearLayoutLayoutParams(LayoutParamsSize.MatchParent, LayoutParamsSize.WrapContent);
view.setLayoutParams(layoutParams);
return view;
}
示例6: Cell
import org.robovm.apple.coregraphics.CGRect; //导入方法依赖的package包/类
public Cell(CGRect frame) {
super(frame);
// change to our custom selected background view
CustomCellBackground backgroundView = new CustomCellBackground(CGRect.Zero());
setSelectedBackgroundView(backgroundView);
image = new UIImageView(new CGRect(5, 6, 144, 105));
addSubview(image);
label = new UILabel(new CGRect(0, 109, 153, 18));
label.setFont(UIFont.getSystemFont(12));
label.setTextColor(UIColor.white());
label.setTextAlignment(NSTextAlignment.Center);
addSubview(label);
}
示例7: resetCachedAssets
import org.robovm.apple.coregraphics.CGRect; //导入方法依赖的package包/类
private void resetCachedAssets() {
imageManager.stopCachingImagesForAllAssets();
previousPreheatRect = CGRect.Zero();
}