本文整理汇总了C#中Loon.Core.Graphics.Opengl.LTexture.GetHeight方法的典型用法代码示例。如果您正苦于以下问题:C# LTexture.GetHeight方法的具体用法?C# LTexture.GetHeight怎么用?C# LTexture.GetHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Loon.Core.Graphics.Opengl.LTexture
的用法示例。
在下文中一共展示了LTexture.GetHeight方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LPaper
public LPaper(LTexture background, int x, int y):base(x, y, background.GetWidth(), background.GetHeight()) {
this.customRendering = true;
this.SetBackground(background);
this.SetElastic(true);
this.SetLocked(true);
this.SetLayer(100);
}
示例2: SpriteSheet
public SpriteSheet(LTexture img, int tw, int th, int s, int m) {
this.width = img.GetWidth();
this.height = img.GetHeight();
this.target = img;
this.tw = tw;
this.th = th;
this.margin = m;
this.spacing = s;
}
示例3: LPad
public LPad(int x, int y, LTexture b, LTexture f, LTexture d, float scale)
: base(x, y, (int)(f.GetWidth() * scale), (int)(f.GetHeight() * scale))
{
this.offsetX = 6 * scale;
this.offsetY = 6 * scale;
this.fore = f;
this.back = b;
this.dot = d;
this.dotWidth = (int)(d.GetWidth() * scale);
this.dotHeight = (int)(d.GetHeight() * scale);
this.baseWidth = (int)(f.GetWidth() * scale);
this.baseHeight = (int)(f.GetHeight() * scale);
this.backWidth = (int)(b.GetWidth() * scale);
this.backHeight = (int)(b.GetHeight() * scale);
this.centerX = (baseWidth - dotWidth) / 2 + offsetX;
this.centerY = (baseHeight - dotHeight) / 2 + offsetY;
this.scale_pad = scale;
}
示例4: Picture
public Picture(LTexture image, int x, int y) {
if (image != null) {
this.SetImage(image);
this.width = image.GetWidth();
this.height = image.GetHeight();
}
this.SetLocation(x, y);
this.visible = true;
}
示例5: RainKernel
public RainKernel(int n, int w, int h)
{
id = n;
rain = XNAConfig.LoadTex(LSystem.FRAMEWORK_IMG_NAME + "rain_" + n + ".png");
rainWidth = rain.GetWidth();
rainHeight = rain.GetHeight();
width = w;
height = h;
offsetX = 0;
offsetY = (5 - n) * 30 + 75 + MathUtils.Random() * 15;
}
示例6: SnowKernel
public SnowKernel(int n, int w, int h)
{
snow = XNAConfig
.LoadTex(LSystem.FRAMEWORK_IMG_NAME + "snow_" + n + ".png");
snowWidth = snow.GetWidth();
snowHeight = snow.GetHeight();
width = w;
height = h;
offsetX = 0;
offsetY = n * 0.6f + 1.9f + MathUtils.Random() * 0.2f;
speed = MathUtils.Random();
}
示例7: Init
private void Init(LTexture tex2d, float limit, bool remove, float scale) {
this.isVisible = true;
this.expandLimit = limit;
this.width = tex2d.GetWidth();
this.height = tex2d.GetHeight();
this.scaleWidth = (int) (width * scale);
this.scaleHeight = (int) (height * scale);
this.loopMaxCount = (MathUtils.Max(scaleWidth, scaleHeight) / 2) + 1;
this.fractions = new float[(scaleWidth * scaleHeight) * maxElements];
this.exWidth = (int) (scaleWidth * expandLimit);
this.exHeigth = (int) (scaleHeight * expandLimit);
LImage image = tex2d.GetImage().ScaledInstance(scaleWidth, scaleHeight);
Color[] pixels = image.GetPixels();
if (image != null) {
image.Dispose();
image = null;
}
this.size = pixels.Length;
this.pixmap = new LPixmapData(exWidth, exHeigth, true);
int no = 0, idx = 0;
int length = fractions.Length;
float angle = 0;
float speed = 0;
System.Random random = LSystem.random;
for (int y = 0; y < scaleHeight; y++) {
for (int x = 0; x < scaleWidth; x++) {
if (idx + maxElements < length) {
no = y * scaleWidth + x;
angle = random.Next(360);
speed = 10f / random.Next(30);
fractions[idx + 0] = x;
fractions[idx + 1] = y;
fractions[idx + 2] = (MathUtils.Cos(angle * MathUtils.PI
/ 180) * speed);
fractions[idx + 3] = (MathUtils.Sin(angle * MathUtils.PI
/ 180) * speed);
fractions[idx + 4] = (pixels[no].PackedValue == 0xff00 ? 0xffffff
: pixels[no].PackedValue);
fractions[idx + 5] = x / 6 + random.Next(10);
idx += maxElements;
}
}
}
if (remove) {
if (tex2d != null) {
tex2d.Destroy();
tex2d = null;
}
}
this.tmp = tex2d;
this.StartUsePixelThread();
}
示例8: PetalKernel
public PetalKernel(int n, int w, int h)
{
id = n;
sakura = XNAConfig.LoadTex(LSystem.FRAMEWORK_IMG_NAME + "sakura_"
+ n + ".png");
sakuraWidth = sakura.GetWidth();
sakuraHeight = sakura.GetHeight();
width = w;
height = h;
offsetX = 0;
offsetY = n * 0.6f + 1.9f + MathUtils.Random() * 0.2f;
speed = MathUtils.Random();
}
示例9: SplitEffect
public SplitEffect(LTexture t, RectBox limit_0, int d)
{
this.texture = t;
this.width = texture.GetWidth();
this.height = texture.GetHeight();
this.halfWidth = width / 2;
this.halfHeight = height / 2;
this.multiples = 2;
this.direction = d;
this.limit = limit_0;
this.timer = new LTimer(10);
this.visible = true;
this.v1 = new Vector2f();
this.v2 = new Vector2f();
switch (direction)
{
case Config.UP:
case Config.DOWN:
special = true;
{
v1.Set(0, 0);
v2.Set(halfWidth, 0);
break;
}
case Config.TLEFT:
case Config.TRIGHT:
v1.Set(0, 0);
v2.Set(halfWidth, 0);
break;
case Config.LEFT:
case Config.RIGHT:
special = true;
{
v1.Set(0, 0);
v2.Set(0, halfHeight);
break;
}
case Config.TUP:
case Config.TDOWN:
v1.Set(0, 0);
v2.Set(0, halfHeight);
break;
}
}
示例10: LMessage
public LMessage(LTexture formImage, int x, int y, int width, int height):base(x, y, width, height) {
this.animation = new Animation();
if (formImage == null) {
this.SetBackground(new LTexture(width, height, true, Loon.Core.Graphics.Opengl.LTexture.Format.SPEED));
this.SetAlpha(0.3F);
} else {
this.SetBackground(formImage);
if (width == -1) {
width = formImage.GetWidth();
}
if (height == -1) {
height = formImage.GetHeight();
}
}
this.print = new Print(GetLocation(), messageFont, width, height);
this.SetTipIcon(XNAConfig.LoadTex(LSystem.FRAMEWORK_IMG_NAME + "creese.png"));
this.totalDuration = 80;
this.customRendering = true;
this.SetWait(false);
this.SetElastic(true);
this.SetLocked(true);
this.SetLayer(100);
}
示例11: CreateUI
public void CreateUI(GLEx g)
{
if (!visible)
{
return;
}
image = animation.GetSpriteImage();
if (image == null)
{
return;
}
float width = (image.GetWidth() * scaleX);
float height = (image.GetHeight() * scaleY);
if (filterColor == null)
{
if (alpha > 0 && alpha < 1)
{
g.SetAlpha(alpha);
}
if (LTrans.TRANS_NONE == transform)
{
g.DrawTexture(image, X(), Y(), width, height, rotation);
}
else
{
g.DrawRegion(image, 0, 0, GetWidth(), GetHeight(), transform,
X(), Y(), LGraphics.TOP | LGraphics.LEFT);
}
if (alpha > 0 && alpha < 1)
{
g.SetAlpha(1);
}
return;
}
else
{
if (alpha > 0 && alpha < 1)
{
g.SetAlpha(alpha);
}
if (LTrans.TRANS_NONE == transform)
{
g.DrawTexture(image, X(), Y(), width, height, rotation,
filterColor);
}
else
{
g.DrawRegion(image, 0, 0, GetWidth(), GetHeight(), transform,
X(), Y(), LGraphics.TOP | LGraphics.LEFT, filterColor);
}
if (alpha > 0 && alpha < 1)
{
g.SetAlpha(1);
}
return;
}
}
示例12: SetImage
public void SetImage(LTexture img)
{
if (img != null || this.image != null)
{
bool sizeChanged = true;
if (img != null && this.image != null
&& img.GetWidth() == this.image.GetWidth()
&& img.GetHeight() == this.image.GetHeight())
{
sizeChanged = false;
}
if (image != null && image.GetParent() == null
&& image.IsChildAllClose())
{
if (image != null)
{
image.Destroy();
image = null;
}
}
this.image = img;
if (sizeChanged)
{
this.boundingRect = null;
this.SizeChanged();
}
}
}
示例13: SetClickImage
public void SetClickImage(LTexture on)
{
if (on == null) {
return;
}
if (bitmap != null) {
bitmap.Dispose();
}
this.bitmap = new LTextureRegion(on);
this.SetSize(on.GetWidth(), on.GetHeight());
}
示例14: SetImageUI
public void SetImageUI(int index, LTexture imageUI)
{
if (imageUI != null)
{
this.width = imageUI.GetWidth();
this.height = imageUI.GetHeight();
}
this.imageUI[index] = imageUI;
}
示例15: SetBackground
public void SetBackground(LTexture background)
{
if (background == null)
{
return;
}
LTexture oldImage = this.background;
if (oldImage != background && oldImage != null)
{
oldImage.Destroy();
oldImage = null;
}
this.background = background;
this.SetAlpha(1.0F);
this.width = background.GetWidth();
this.height = background.GetHeight();
if (this.width <= 0)
{
this.width = 1;
}
if (this.height <= 0)
{
this.height = 1;
}
}