本文整理汇总了C#中LColor类的典型用法代码示例。如果您正苦于以下问题:C# LColor类的具体用法?C# LColor怎么用?C# LColor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LColor类属于命名空间,在下文中一共展示了LColor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: End
internal void End(LColor col)
{
glbase.Transform(this.primitiveType, this.numVertices, this.vertexsBuffer, this.texCoordsBuffer, this.colorsBuffer, this.hasCols, true, col);
glbase.Send(this.primitiveType, this.numVertices);
glbase.Clear(m_maxVertices);
GLEx.GL.EnableTextures();
}
示例2: ParticleSystem
public ParticleSystem(string defaultSpriteRef, int maxParticles, LColor mask)
{
this.maxParticlesPerEmitter = maxParticles;
this.mask = mask;
SetDefaultImageName(defaultSpriteRef);
dummy = CreateParticle(this);
}
示例3: CreateFontImage
public static LImage CreateFontImage(LFont font, LColor color, string text)
{
LImage image = LImage.CreateImage(font.StringWidth(text), font.GetHeight());
LGraphics g = image.GetLGraphics();
g.SetFont(font);
g.DrawString(text, 0, 0, color);
g.Dispose();
return image;
}
示例4: AdjustColor
public void AdjustColor(float r, float g, float b, float a)
{
if (color == null)
{
color = new LColor(1, 1, 1, 1f);
}
color.r += r;
color.g += g;
color.b += b;
color.a += a;
}
示例5: Draw
public Loon.Core.Geom.Point.Point2i Draw(string name, float dx1, float dy1, float dx2,
float dy2, float sx1, float sy1, float sx2, float sy2,
float rotation, LColor color) {
this.Pack();
if (GLEx.Self != null) {
PackEntry entry = GetEntry(name);
if (entry == null) {
return null;
}
if (texture.IsBatch()) {
texture.Draw(dx1, dy1, dx2, dy2, sx1 + entry.bounds.left, sy1
+ entry.bounds.top, sx2 + entry.bounds.left, sy2
+ entry.bounds.top, rotation, color);
} else {
GLEx.Self.DrawTexture(texture, dx1, dy1, dx2, dy2, sx1
+ entry.bounds.left, sy1 + entry.bounds.top, sx2
+ entry.bounds.left, sy2 + entry.bounds.top, rotation,
color);
}
blittedSize.Set(entry.bounds.Width(), entry.bounds.Height());
}
return blittedSize;
}
示例6: DrawOnlyBatch
public void DrawOnlyBatch(int id, float x, float y, LColor[] c)
{
this.Pack();
PackEntry entry = GetEntry(id);
if (entry == null) {
return;
}
if (texture.IsBatch()) {
texture.Draw(x, y, entry.bounds.Width(), entry.bounds.Height(),
entry.bounds.left, entry.bounds.top, entry.bounds.right,
entry.bounds.bottom, c);
}
}
示例7: GLColor
public void GLColor(LColor c)
{
colors.Add(c.Color);
this.hasCols = true;
}
示例8: SetFontColor
public virtual void SetFontColor(LColor fontColor)
{
this.fontColor = fontColor;
}
示例9: ColorRecord
public ColorRecord(float pos, LColor col)
{
this.pos = pos;
this.col = col;
}
示例10: AddColorPoint
public void AddColorPoint(float pos, LColor col)
{
colors.Add(new ColorRecord(pos, col));
}
示例11: SetColor
public void SetColor(float r, float g, float b, float a)
{
if (color == LColor.white)
{
color = new LColor(r, g, b, a);
}
else
{
color.r = r;
color.g = g;
color.b = b;
color.a = a;
}
}
示例12: DrawSixStart
public void DrawSixStart(LColor color, int x, int y, int r)
{
DrawSixStart(color.Color, x, y, r);
}
示例13: DrawRTriangle
public void DrawRTriangle(LColor color, int x, int y, int r)
{
DrawRTriangle(color.Color, x, y, r);
}
示例14: SetColor
public void SetColor(LColor c)
{
if (c == null)
{
return;
}
this.colorValue = c.Color;
}
示例15: Set
private void Set(XMLElement Pack) {
this.fileName = Pack.GetAttribute("file", null);
this.name = Pack.GetAttribute("name", fileName);
int r = Pack.GetIntAttribute("r", -1);
int g = Pack.GetIntAttribute("g", -1);
int b = Pack.GetIntAttribute("b", -1);
int a = Pack.GetIntAttribute("a", -1);
if (r != -1 && g != -1 && b != -1 && a != -1) {
colorMask = new LColor(r, g, b, a);
}
if (fileName != null) {
List<XMLElement> blocks = Pack.List("block");
foreach (XMLElement e in blocks) {
PackEntry entry = new PackEntry(null);
int id = e.GetIntAttribute("id", count);
entry.id = id;
entry.fileName = e.GetAttribute("name", null);
entry.bounds.left = e.GetIntAttribute("left", 0);
entry.bounds.top = e.GetIntAttribute("top", 0);
entry.bounds.right = e.GetIntAttribute("right", 0);
entry.bounds.bottom = e.GetIntAttribute("bottom", 0);
if (entry.fileName != null) {
temps.Put(entry.fileName, entry);
} else {
temps.Put(Convert.ToString(id), entry);
}
count++;
}
this.packing = false;
this.packed = true;
}
this.useAlpha = true;
}