本文整理汇总了Java中com.panoramagl.ios.structs.CGSize类的典型用法代码示例。如果您正苦于以下问题:Java CGSize类的具体用法?Java CGSize怎么用?Java CGSize使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CGSize类属于com.panoramagl.ios.structs包,在下文中一共展示了CGSize类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initializeValues
import com.panoramagl.ios.structs.CGSize; //导入依赖的package包/类
@Override
protected void initializeValues()
{
mBackingWidth = new int[1];
mBackingHeight = new int[1];
mDefaultFramebuffer = new int[1];
mColorRenderbuffer = new int[1];
mIsRunning = mIsRendering = false;
mViewport = CGRect.CGRectMake(mTempViewport = CGRect.CGRectMake(0, 0, PLConstants.kViewportSize, PLConstants.kViewportSize));
mSize = CGSize.CGSizeMake(mTempSize = CGSize.CGSizeMake(0.0f, 0.0f));
mContextSupportsFrameBufferObject = false;
}
示例2: scale
import com.panoramagl.ios.structs.CGSize; //导入依赖的package包/类
/**scale methods*/
@Override
public PLIImage scale(CGSize size)
{
return this.scale(size.width, size.height);
}
示例3: getSize
import com.panoramagl.ios.structs.CGSize; //导入依赖的package包/类
@Override
public CGSize getSize()
{
final DisplayMetrics displayMetrics = new DisplayMetrics();
this.getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
return mTempSize.setValues(displayMetrics.widthPixels, displayMetrics.heightPixels);
}
示例4: getSize
import com.panoramagl.ios.structs.CGSize; //导入依赖的package包/类
@Override
public CGSize getSize() {
Display display = ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
final DisplayMetrics displayMetrics = new DisplayMetrics();
display.getMetrics(displayMetrics);
return mTempSize.setValues(displayMetrics.widthPixels, displayMetrics.heightPixels);
}
示例5: getSize
import com.panoramagl.ios.structs.CGSize; //导入依赖的package包/类
@Override
public CGSize getSize()
{
return mTempSize.setValues(mSize);
}
示例6: PLImage
import com.panoramagl.ios.structs.CGSize; //导入依赖的package包/类
public PLImage(CGSize size)
{
this(size.width, size.height);
}
示例7: getSize
import com.panoramagl.ios.structs.CGSize; //导入依赖的package包/类
@Override
public CGSize getSize()
{
return CGSize.CGSizeMake(mWidth, mHeight);
}
示例8: getRenderingSize
import com.panoramagl.ios.structs.CGSize; //导入依赖的package包/类
@Override
public CGSize getRenderingSize()
{
return (mRenderer != null ? mTempRenderingSize.setValues(mRenderer.getSize()) : mTempRenderingSize.reset());
}
示例9: accelerometer
import com.panoramagl.ios.structs.CGSize; //导入依赖的package包/类
protected void accelerometer(SensorEvent event, UIAcceleration acceleration)
{
if(this.isLocked() || this.resetWithShake(acceleration) || mIsValidForTouch || mIsValidForScrolling || mIsValidForSensorialRotation || mIsValidForCameraAnimation || mIsValidForTransition)
return;
if(mIsAccelerometerEnabled)
{
if(mListener != null && !mListener.onShouldAccelerate(this, acceleration, event))
return;
float x = 0.0f, y = (mIsAccelerometerUpDownEnabled ? -acceleration.z : 0.0f), factor = mAccelerometerSensitivity * (mPanorama.getCamera().isReverseRotation() ? -PLConstants.kAccelerometerMultiplyFactor : PLConstants.kAccelerometerMultiplyFactor);
switch(this.getCurrentDeviceOrientation())
{
case UIDeviceOrientationUnknown:
case UIDeviceOrientationPortrait:
if(mIsAccelerometerLeftRightEnabled)
x = acceleration.x;
break;
case UIDeviceOrientationLandscapeLeft:
if(mIsAccelerometerLeftRightEnabled)
x = -acceleration.y;
break;
case UIDeviceOrientationLandscapeRight:
if(mIsAccelerometerLeftRightEnabled)
x = acceleration.y;
break;
case UIDeviceOrientationPortraitUpsideDown:
if(mIsAccelerometerLeftRightEnabled)
x = -acceleration.x;
break;
default:
break;
}
CGSize size = mRenderer.getSize();
mAuxiliarStartPoint.setValues(size.width >> 1, size.height >> 1);
mAuxiliarEndPoint.setValues(mAuxiliarStartPoint.x + x * factor, mAuxiliarStartPoint.y + y * factor);
mPanorama.getCamera().rotate(this, mAuxiliarStartPoint, mAuxiliarEndPoint);
if(mListener != null)
mListener.onDidAccelerate(this, acceleration, event);
}
}
示例10: onCreate
import com.panoramagl.ios.structs.CGSize; //导入依赖的package包/类
/**android: events methods*/
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
try
{
mSensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE);
mGestureDetector = new GestureDetector
(
this,
new SimpleOnGestureListener()
{
@Override
public boolean onDoubleTap(MotionEvent event)
{
return PLView.this.onDoubleTap(event);
}
@Override
public boolean onDoubleTapEvent(MotionEvent event)
{
return PLView.this.onDoubleTapEvent(event);
}
@Override
public boolean onSingleTapConfirmed(MotionEvent event)
{
return PLView.this.onSingleTapConfirmed(event);
}
}
);
mTempRenderingViewport = new CGRect();
mTempRenderingSize = new CGSize();
mTempSize = new CGSize();
mTempAcceleration = new UIAcceleration();
mInternalTouches = new ArrayList<UITouch>(kMaxTouches);
mCurrentTouches = new ArrayList<UITouch>(kMaxTouches);
mLocation = new int[2];
this.initializeValues();
}
catch(Throwable e)
{
PLLog.error("PLView::onCreate", e);
}
}
示例11: getRenderingSize
import com.panoramagl.ios.structs.CGSize; //导入依赖的package包/类
@Override
public CGSize getRenderingSize() {
return (mRenderer != null ? mTempRenderingSize.setValues(mRenderer.getSize()) : mTempRenderingSize.reset());
}
示例12: accelerometer
import com.panoramagl.ios.structs.CGSize; //导入依赖的package包/类
protected void accelerometer(SensorEvent event, UIAcceleration acceleration) {
if(this.isLocked() || this.resetWithShake(acceleration) || mIsValidForTouch || mIsValidForScrolling || mIsValidForSensorialRotation || mIsValidForCameraAnimation || mIsValidForTransition)
return;
if(mIsAccelerometerEnabled) {
if(mListener != null && !mListener.onShouldAccelerate(this, acceleration, event))
return;
float x = 0.0f, y = (mIsAccelerometerUpDownEnabled ? -acceleration.z : 0.0f), factor = mAccelerometerSensitivity * (mPanorama.getCamera().isReverseRotation() ? -PLConstants.kAccelerometerMultiplyFactor : PLConstants.kAccelerometerMultiplyFactor);
switch(this.getCurrentDeviceOrientation())
{
case UIDeviceOrientationUnknown:
case UIDeviceOrientationPortrait:
if(mIsAccelerometerLeftRightEnabled)
x = acceleration.x;
break;
case UIDeviceOrientationLandscapeLeft:
if(mIsAccelerometerLeftRightEnabled)
x = -acceleration.y;
break;
case UIDeviceOrientationLandscapeRight:
if(mIsAccelerometerLeftRightEnabled)
x = acceleration.y;
break;
case UIDeviceOrientationPortraitUpsideDown:
if(mIsAccelerometerLeftRightEnabled)
x = -acceleration.x;
break;
default:
break;
}
CGSize size = mRenderer.getSize();
mAuxiliarStartPoint.setValues(size.width >> 1, size.height >> 1);
mAuxiliarEndPoint.setValues(mAuxiliarStartPoint.x + x * factor, mAuxiliarStartPoint.y + y * factor);
mPanorama.getCamera().rotate(this, mAuxiliarStartPoint, mAuxiliarEndPoint);
if(mListener != null)
mListener.onDidAccelerate(this, acceleration, event);
}
}
示例13: onCreate
import com.panoramagl.ios.structs.CGSize; //导入依赖的package包/类
/**android: events methods*/
public void onCreate() {
try
{
mSensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
mGestureDetector = new GestureDetector (
context,
new SimpleOnGestureListener()
{
@Override
public boolean onDoubleTap(MotionEvent event)
{
return PLManager.this.onDoubleTap(event);
}
@Override
public boolean onDoubleTapEvent(MotionEvent event)
{
return PLManager.this.onDoubleTapEvent(event);
}
@Override
public boolean onSingleTapConfirmed(MotionEvent event)
{
return PLManager.this.onSingleTapConfirmed(event);
}
}
);
mTempRenderingViewport = new CGRect();
mTempRenderingSize = new CGSize();
mTempSize = new CGSize();
mTempAcceleration = new UIAcceleration();
mInternalTouches = new ArrayList<UITouch>(kMaxTouches);
mCurrentTouches = new ArrayList<UITouch>(kMaxTouches);
mLocation = new int[2];
this.initializeValues();
}
catch(Throwable e)
{
PLLog.error("PLView::onCreate", e);
}
}
示例14: scale
import com.panoramagl.ios.structs.CGSize; //导入依赖的package包/类
/**scale methods*/
PLIImage scale(CGSize size);
示例15: getSize
import com.panoramagl.ios.structs.CGSize; //导入依赖的package包/类
CGSize getSize();