Skip to content

Commit

Permalink
Change IsUseAntAlias to IsAntialiased
Browse files Browse the repository at this point in the history
  • Loading branch information
kjpou1 committed Aug 9, 2013
1 parent 1bd757a commit e0230dc
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 41 deletions.
6 changes: 3 additions & 3 deletions cocos2d/base_nodes/CCAtlasNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public int QuadsToDraw
set { m_uQuadsToDraw = value; }
}

public bool IsUseAntiAlias
public bool IsAntialiased
{
get { return Texture.IsUseAntiAlias; }
get { return Texture.IsAntialiased; }

set { Texture.IsUseAntiAlias = value; }
set { Texture.IsAntialiased = value; }
}

#region ICCRGBAProtocol Members
Expand Down
2 changes: 1 addition & 1 deletion cocos2d/misc_nodes/CCRenderTexture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected virtual bool InitWithWidthAndHeight(int w, int h, SurfaceFormat colorF
h = (h * CCMacros.CCContentScaleFactor());

m_pTexture = new CCTexture2D();
m_pTexture.IsUseAntiAlias = false;
m_pTexture.IsAntialiased = false;

m_pRenderTarget2D = CCDrawManager.CreateRenderTarget(w, h, colorFormat, depthFormat, usage);
m_pTexture.InitWithTexture(m_pRenderTarget2D, colorFormat, true, false);
Expand Down
6 changes: 3 additions & 3 deletions cocos2d/sprite_nodes/CCSprite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,11 @@ public CCSpriteBatchNode BatchNode
}
}

public bool IsUseAntiAlias
public bool IsAntialiased
{
get { return Texture.IsUseAntiAlias; }
get { return Texture.IsAntialiased; }

set { Texture.IsUseAntiAlias = value; }
set { Texture.IsAntialiased = value; }
}

#region RGBA protocol
Expand Down
6 changes: 3 additions & 3 deletions cocos2d/sprite_nodes/CCSpriteBatchNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ public virtual CCTexture2D Texture
}
}

public bool IsUseAntiAlias
public bool IsAntialiased
{
get { return Texture.IsUseAntiAlias; }
get { return Texture.IsAntialiased; }

set { Texture.IsUseAntiAlias = value; }
set { Texture.IsAntialiased = value; }
}

#endregion
Expand Down
18 changes: 9 additions & 9 deletions cocos2d/textures/CCTexture2D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ public class CCTexture2D : CCGraphicsResource
private int m_uPixelsWide;

private bool m_bManaged;
private bool m_bAntialias;
private bool m_bAntialiased;

public CCTexture2D()
{
m_samplerState = SamplerState.LinearClamp;
m_bAntialias = true;
m_bAntialiased = true;
}

public bool IsTextureDefined
Expand Down Expand Up @@ -150,18 +150,18 @@ public SamplerState SamplerState
set { m_samplerState = value; }
}

public bool IsUseAntiAlias
public bool IsAntialiased
{
get { return m_bAntialias; }
get { return m_bAntialiased; }

set
{
if (m_bAntialias != value)
if (m_bAntialiased != value)
{
m_bAntialias = value;
m_bAntialiased = value;
var saveState = m_samplerState;

if (m_bAntialias)
if (m_bAntialiased)
{
m_samplerState = new SamplerState
{
Expand Down Expand Up @@ -279,7 +279,7 @@ public void SaveAsPng(Stream stream, int width, int height)
}
}

[Obsolete("Use IsUseAntiAlias property.")]
[Obsolete("Use IsAntialiased property.")]
public void SetAntiAliasTexParameters()
{
SamplerState saveState = m_samplerState;
Expand All @@ -293,7 +293,7 @@ public void SetAntiAliasTexParameters()
};
}

[Obsolete("Use IsUseAntiAlias property.")]
[Obsolete("Use IsAntialiased property.")]
public void SetAliasTexParameters()
{

Expand Down
6 changes: 3 additions & 3 deletions cocos2d/textures/CCTextureAtlas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ public CCTexture2D Texture
set { m_pTexture = value; }
}

public bool IsUseAntiAlias
public bool IsAntialiased
{
get { return Texture.IsUseAntiAlias; }
get { return Texture.IsAntialiased; }

set { Texture.IsUseAntiAlias = value; }
set { Texture.IsAntialiased = value; }
}

#endregion
Expand Down
2 changes: 1 addition & 1 deletion cocos2d/tileMap_parallax_nodes/CCTMXLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ public void SetupTiles()
// - easier to render
// cons:
// - difficult to scale / rotate / etc.
m_pobTextureAtlas.IsUseAntiAlias = false;
m_pobTextureAtlas.IsAntialiased = false;

//CFByteOrder o = CFByteOrderGetCurrent();

Expand Down
2 changes: 1 addition & 1 deletion tests/tests/classes/tests/ParallaxTest/Parallax1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public Parallax1()
tilemap.AnchorPoint = new CCPoint(0, 0);

// Anti Aliased images
tilemap.IsUseAntiAlias = true;
tilemap.IsAntialiased = true;


// background layer: another image
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/classes/tests/ParallaxTest/Parallax2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public Parallax2()
tilemap.AnchorPoint = new CCPoint(0, 0);

// Anti Aliased images
tilemap.IsUseAntiAlias = true;
tilemap.IsAntialiased = true;

// background layer: another image
CCSprite background = new CCSprite(TestResource.s_back);
Expand Down
4 changes: 2 additions & 2 deletions tests/tests/classes/tests/SpriteTest/SpriteAliased.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ public override void OnEnter()
// So sprite1 and sprite2 will be affected by this change
//
CCSprite sprite = (CCSprite)GetChildByTag((int)kTagSprite.kTagSprite1);
sprite.IsUseAntiAlias = false;
sprite.IsAntialiased = false;
}

public override void OnExit()
{
// restore the tex parameter to AntiAliased.
CCSprite sprite = (CCSprite)GetChildByTag((int)kTagSprite.kTagSprite1);
sprite.IsUseAntiAlias = true;
sprite.IsAntialiased = true;
base.OnExit();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ public override void OnEnter()
{
base.OnEnter();
CCSpriteBatchNode batch = (CCSpriteBatchNode)GetChildByTag((int)kTags.kTagSpriteBatchNode);
batch.IsUseAntiAlias = false;
batch.IsAntialiased = false;
}

public override void OnExit()
{
// restore the tex parameter to AntiAliased.
CCSpriteBatchNode batch = (CCSpriteBatchNode)GetChildByTag((int)kTags.kTagSpriteBatchNode);
batch.IsUseAntiAlias = true;
batch.IsAntialiased = true;
base.OnExit();
}

Expand Down
12 changes: 6 additions & 6 deletions tests/tests/classes/tests/Texture2dTest/Texture2dTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ public override void OnEnter()
AddChild(sprite);

// this is the default filterting
sprite.IsUseAntiAlias = true;
sprite.IsAntialiased = true;

//
// Sprite 1: GL_NEAREST
Expand All @@ -1011,7 +1011,7 @@ public override void OnEnter()
AddChild(sprite2);

// Use Nearest in this one
sprite2.IsUseAntiAlias = false;
sprite2.IsAntialiased = false;

// scale them to show
CCScaleBy sc = new CCScaleBy(3, 8.0f);
Expand Down Expand Up @@ -1377,31 +1377,31 @@ public override void OnEnter()

sprite = new CCSprite("Images/grossinis_sister1");
sprite.Position = new CCPoint(s.Width/5*1, s.Height/2);
sprite.IsUseAntiAlias = false;
sprite.IsAntialiased = false;
sprite.Scale = 2;
AddChild(sprite);

CCTextureCache.SharedTextureCache.RemoveTexture(sprite.Texture);

sprite = new CCSprite("Images/grossinis_sister1");
sprite.Position = new CCPoint(s.Width/5*2, s.Height/2);
sprite.IsUseAntiAlias = true;
sprite.IsAntialiased = true;
sprite.Scale = 2;
AddChild(sprite);

// 2nd set of sprites

sprite = new CCSprite("Images/grossinis_sister2");
sprite.Position = new CCPoint(s.Width/5*3, s.Height/2);
sprite.IsUseAntiAlias = false;
sprite.IsAntialiased = false;
sprite.Scale = 2;
AddChild(sprite);

CCTextureCache.SharedTextureCache.RemoveTextureForKey("Images/grossinis_sister2");

sprite = new CCSprite("Images/grossinis_sister2");
sprite.Position = new CCPoint(s.Width/5*4, s.Height/2);
sprite.IsUseAntiAlias = true;
sprite.IsAntialiased = true;
sprite.Scale = 2;
AddChild(sprite);
}
Expand Down
12 changes: 6 additions & 6 deletions tests/tests/classes/tests/TileMapTest/TileMapTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public TileMapTest()
{
CCTileMapAtlas map = CCTileMapAtlas.Create(s_TilesPng, s_LevelMapTga, 16, 16);
// Convert it to "alias" (GL_LINEAR filtering)
map.IsUseAntiAlias = true;
map.IsAntialiased = true;

CCSize s = map.ContentSize;
CCLog.Log("ContentSize: {0}, {1}", s.Width, s.Height);
Expand Down Expand Up @@ -54,7 +54,7 @@ public TileMapEditTest()
{
CCTileMapAtlas map = CCTileMapAtlas.Create(s_TilesPng, s_LevelMapTga, 16, 16);
// Create an Aliased Atlas
map.IsUseAntiAlias = false;
map.IsAntialiased = false;

CCSize s = map.ContentSize;
CCLog.Log("ContentSize: {0}, {1}", s.Width, s.Height);
Expand Down Expand Up @@ -326,7 +326,7 @@ public TMXReadWriteTest()
AddChild(map, 0, kTagTileMap);

CCTMXLayer layer = map.LayerNamed("Layer 0");
layer.IsUseAntiAlias = true;
layer.IsAntialiased = true;

map.Scale = (1);

Expand Down Expand Up @@ -615,13 +615,13 @@ public TMXTilesetTest()

CCTMXLayer layer;
layer = map.LayerNamed("Layer 0");
layer.IsUseAntiAlias = true;
layer.IsAntialiased = true;

layer = map.LayerNamed("Layer 1");
layer.IsUseAntiAlias = true;
layer.IsAntialiased = true;

layer = map.LayerNamed("Layer 2");
layer.IsUseAntiAlias = true;
layer.IsAntialiased = true;
}

public override string title()
Expand Down

0 comments on commit e0230dc

Please sign in to comment.