Google cardBoard Android API (十四):ViewPort
2016-03-21 15:27
429 查看
Viewport
public class ViewportDefines a viewport rectangle.
Fields
public int height | ||
public int width | ||
public int | x | |
public int | y |
Public Constructors
Viewport() |
Public Methods
boolean | equals(Object obj) |
void | , int)]getAsArray(int[] array, int offset) |
int | hashCode() |
void | setGLScissor() |
void | setGLViewport() |
void | setViewport(int x, int y, int width, int height) |
String | toString() |
Inherited Methods
▸From class java.lang.Object
Fields
public int height
public int width
public int x
public int y
Public Constructors
public Viewport ()
Public Methods
public boolean equals (Object obj)
public void getAsArray (int[] array, int offset)
Stores the viewport parameters into an int array.Parameters
array | Array to store values in. |
---|---|
offset | Offset into the array to start writing values in. |
Throws
IllegalArgumentException | If there is not enough space to write the result. |
---|
public int hashCode ()
public void setGLScissor ()
Sets the current OpenGL scissor rect based on the current viewport settings.
public void setGLViewport ()
Sets the current OpenGL viewport based on the current viewport settings.
public void setViewport (int x, int y, int width, int height)
Sets a new viewport based on the provided coordinates and dimensions.Parameters
x | Horizontal pixel coordinate of the bottom-left corner of the viewport. |
---|---|
y | Vertical pixel coordinate of the bottom-left corner of the viewport. |
width | Width of the viewport in pixels. |
height | Height of the viewport in pixels. |
public String toString ()
Returns a string containing a concise, human-readable description of this object.Returns
A printable representation of this object.
width |
相关文章推荐
- Android ViewPager无限循环实现底部小圆点动态滑动
- Google cardBoard Android API (十三):ScreenParams
- android studio的使用
- Android开发-ADT Bundle安装
- Android 监听各个Acitivity的生命周期
- Google cardBoard Android API (十二):HeadTransform
- Android启动过程深入解析
- Android 底部导航控件实例代码
- Google cardBoard Android API (十一):HeadMountedDisplayManager
- [待解决问题] 启动不了Android工程
- 跟着Google学Android —— 1.2 第一次当然是献给Hello World
- Android中ListView点击事件失效的解决办法
- Android动画分类和详解
- Google cardBoard Android API (十):HeadMountedDisplay
- Android学习之解决ScrollView嵌套ListView显示的错误
- Android实现简单的分批加载ListView
- 掌握AndroidAnnotations进行快速Android开发
- Google cardBoard Android API (九):FieldOfView
- 中午乱码问题
- 在android的同一个wifi局域网下,利用socket与多个手机进行数据的收发