XNA 學習-1

來源:互聯網
上載者:User
 Microsoft.Xna.Framework.Graphics.SpriteBatch類中的Draw函數:

public void Draw (
         Texture2D texture,
         Vector2 position,
         Nullable<Rectangle> sourceRectangle,
         Color color,
         float rotation,
         Vector2 origin,
         Vector2 scale,
         SpriteEffects effects,
         float layerDepth)
texture:精靈的紋理,即所要繪製在螢幕上的映像
position:映像的左上方位置
sourceRectangle:以映像的左上方為(0,0),在螢幕上只顯示映像中sourceRectangle指定的矩形中的部分
color:調製通道的顏色,採用白色時,保持圖片原色
rotation:以position為中心,順時針旋轉rotation弧度
origin:顯示視窗左上方的座標值
scale:映像顯示時x座標放大scale.x倍,y座標放大scale.y倍
effects:只有以下3各值:
SpriteEffects.FlipHorizontally:水平翻轉
SpriteEffects.FlipVertically:垂直翻轉
SpriteEffects.None:不翻轉
layerDepth:精靈的顯示圖層深度,形成層次的立體感

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.