本文整理汇总了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: 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));
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);
if (XNAConfig.IsActive())
{
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);
}
示例2: 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;
}
示例3: 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;
}
示例4: RainKernel
public RainKernel(int n, int w, int h)
{
id = n;
rain = XNAConfig.LoadTexture("rain_" + n + ".png");
rainWidth = rain.GetWidth();
rainHeight = rain.GetHeight();
width = w;
height = h;
offsetX = 0;
offsetY = (5 - n) * 30 + 75 + MathUtils.Random() * 15;
}
示例5: Picture
public Picture(LTexture i, int x, int y)
{
this.alpha = 1f;
if (i != null)
{
this.SetImage(i);
this.width = i.GetWidth();
this.height = i.GetHeight();
}
this.SetLocation(x, y);
this.visible = true;
}
示例6: SnowKernel
public SnowKernel(int n, int w, int h)
{
snow = XNAConfig
.LoadTexture("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: PetalKernel
public PetalKernel(int n, int w, int h)
{
id = n;
sakura = XNAConfig.LoadTexture("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();
}
示例8: CrossEffect
public CrossEffect(int c, LTexture o, LTexture n)
{
this.code = c;
this.otexture = o;
this.ntexture = n;
this.width = o.GetWidth();
this.height = o.GetHeight();
if (width > height) {
maxcount = 16;
} else {
maxcount = 8;
}
this.timer = new LTimer(160);
this.visible = true;
}
示例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: SpriteRegion
public SpriteRegion(LTexture texture)
: this(texture, 0, 0, texture.GetWidth(), texture.GetHeight())
{
}
示例11: LInfo
public LInfo(LTexture formImage, int x, int y, int width, int height)
: base(x, y, width, height)
{
fontSize = deffont.GetSize();
if (formImage == null)
{
this.SetBackground(new LTexture(width, height, true));
this.SetAlpha(0.3F);
}
else
{
this.SetBackground(formImage);
if (width == -1)
{
width = formImage.GetWidth();
}
if (height == -1)
{
height = formImage.GetHeight();
}
}
this.message_char_count = 0;
this.message_x = new int[messageCountMax];
this.message_y = new int[messageCountMax];
this.locatePoint = new List<LocatePoint>();
this.flag = new FlagImage(this);
this.customRendering = true;
this.SetElastic(true);
this.SetLayer(100);
}
示例12: CreateUI
public virtual 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(), LTrans.TOP | LTrans.LEFT);
}
if (alpha > 0 && alpha < 1) {
g.SetAlpha(1);
}
return;
} else {
Color old = g.GetColor();
if (alpha > 0 && alpha < 1) {
g.SetAlpha(alpha);
}
g.SetColor(filterColor);
if (LTrans.TRANS_NONE == transform) {
g.DrawTexture(image, X(), Y(), width, height, rotation);
} else {
g.DrawRegion(image, 0, 0, GetWidth(), GetHeight(), transform,
X(), Y(), LTrans.TOP | LTrans.LEFT);
}
g.SetColor(old);
if (alpha > 0 && alpha < 1) {
g.SetAlpha(1);
}
return;
}
}
示例13: EmulatorButton
public EmulatorButton(LTexture img, int w, int h, int x, int y, bool flag)
: this(img, w, h, x, y, flag, img.GetWidth(), img.GetHeight())
{
}
示例14: SetBackground
public virtual void SetBackground(LTexture background)
{
if (background != null)
{
SetRepaintMode(SCREEN_BITMAP_REPAINT);
LTexture screen = null;
if (background.GetWidth() != GetWidth() || background.GetHeight() != GetHeight())
{
screen = background.Scale(GetWidth(), GetHeight());
}
else
{
screen = background;
}
LTexture tmp = currentScreen;
currentScreen = screen;
if (tmp != null)
{
tmp.Destroy();
tmp = null;
}
}
else
{
SetRepaintMode(SCREEN_CANVAS_REPAINT);
}
}
示例15: 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);
LPixmap image = tex2d.GetImage().ScaledInstance(scaleWidth, scaleHeight);
Color[] pixels = image.GetData();
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();
}