このページをGitHubで編集する

Class: PIXI.Graphics

PIXI.Graphics (geometry)

new PIXI.Graphics (geometry)

PIXI.tilemap.GraphicsLayer のスーパークラス。

線や丸などを使って画像を描くためのクラス。 多くのメソッドが自分自身である PIXI.Graphics を返してくるのは、メソッドを連続で書くメソッドチェーンを使えるようにするため。

詳細は本家 PIXI のサイト PIXI.Graphics を参照。

Parameters:
Name Type Description
geometry PIXI.GraphicsGeometry opt.
Properties:
Name Type Description
_fillStyle PIXI.FillStyle 塗りの形式
_holeMode Boolean 規定値: false
_lineStyle PIXI.LineStyle 線の形式
_matrix PIXI.Matrix 変形行列
batches Array.<Object>  
batchTint Number 規定値: -1
blendMode Number 規定値: PIXI.BLEND_MODES.NORMAL
currentPath PIXI.Polygon  
fill PIXI.FillStyle [read-only] 塗りの形式
geometry PIXI.GraphicsGeometry  
line PIXI.LineStyle [read-only] 線の形式
pluginName String 規定値: 'batch'
shader PIXI.Shader シェーダー
state PIXI.State 状態
tint Number 規定値: 0xFFFFFF
vertexData Float32Array  

Extends

Inherited From

PIXI.DisplayObject

PIXI.Container

Methods

_calculateBounds ()

Overrides:

PIXI.Container.md._calculateBounds ()

_initCurve (x, y)

Parameters:
Name Type Default Description
x Number 0 opt.
y Number 0 opt.

_render (renderer)

Overrides:
Parameters:
Name Type Description
renderer PIXI.Renderer  

arc (cx, cy, radius, startAngle, endAngle, anticlockwise) → {PIXI.Graphics}

Parameters:
Name Type Default Description
cx Number    
cy Number    
radius Number    
startAngle Number    
endAngle Number    
anticlockwise Number false opt.
Returns:
Type
PIXI.Graphics

arcTo (x1, y1, x2, y2, radius) → {PIXI.Graphics}

Parameters:
Name Type Default Description
x1 Number    
y1 Number    
x2 Number    
y2 Number    
radius Number    
Returns:
Type
PIXI.Graphics

beginFill (color, alpha) → {PIXI.Graphics}

Parameters:
Name Type Default Description
color Number 0 opt.
alpha Number 1 opt.
Returns:
Type
PIXI.Graphics

beginHole () → {PIXI.Graphics}

Returns:
Type
PIXI.Graphics

beginTextureFill (color, alpha) → {PIXI.Graphics}

Parameters:
Name Type Default Description
texture PIXI.Texture PIXI.Texture.WHITE opt.
color Number 0xffffff opt.
alpha Number 1 opt.
alpha PIXI.Matrix null opt.
Returns:
Type
PIXI.Graphics

bezierCurveTo (cpX, cpY, cpX2, cpY2, toX, toY) → {PIXI.Graphics}

Parameters:
Name Type Description
cpX Number  
cpY Number  
cpX2 Number  
cpY2 Number  
toX Number  
toY Number  
Returns:
Type
PIXI.Graphics

calculateTints ()

calculateVertices ()

clear () → {PIXI.Graphics}

Returns:
Type
PIXI.Graphics

clone () → {PIXI.Graphics}

Returns:
Type
PIXI.Graphics

closePath () → {PIXI.Graphics}

Returns:
Type
PIXI.Graphics

containsPoint (point) → {Boolean}

指定座標が含まれるか。

Parameters:
Name Type Description
point PIXI.Point  
Returns:
Type
Boolean

destroy (options)

破棄する。

Overrides:

PIXI.Container.destroy (options)

Parameters:
Name Type Description
options Object | Boolean opt. 以下のオプション全てに同じ値が設定される

options に Object として指定する内容

Name Type Default Description
children Boolean false opt. 子も破棄するか
texture Boolean false opt. children と texture が true だと子のテクスチャを破棄する
baseTexture Boolean false opt. children と baseTexture が true だと子のベーステクスチャを破棄する

drawCircle (x, y, radius) → {PIXI.Graphics}

円を描く。

Parameters:
Name Type Description
x Number 中心のx座標(ピクセル)
y Number 中心のy座標(ピクセル)
radius Number 半径(ピクセル)
Returns:
Type
PIXI.Graphics

drawEllipse (x, y, width, height) → {PIXI.Graphics}

楕円を描く。

Parameters:
Name Type Description
x Number 中心のx座標(ピクセル)
y Number 中心のy座標(ピクセル)
width Number 幅(ピクセル)
height Number 高さ(ピクセル)
Returns:
Type
PIXI.Graphics

drawPolygon (path) → {PIXI.Graphics}

多角形を描く。

Parameters:
Name Type Description
path Array.<Number> | Array.<PIXI.Point> | Array.<PIXI.Polygon> パス
Returns:
Type
PIXI.Graphics

drawRect (x, y, width, height) → {PIXI.Graphics}

四角形を描く。

Parameters:
Name Type Description
x Number 中心のx座標(ピクセル)
y Number 中心のy座標(ピクセル)
width Number 幅(ピクセル)
height Number 高さ(ピクセル)
Returns:
Type
PIXI.Graphics

drawRoundedRect (x, y, width, height, radius) → {PIXI.Graphics}

角丸の四角形を描く。

Parameters:
Name Type Description
x Number 中心のx座標(ピクセル)
y Number 中心のy座標(ピクセル)
width Number 幅(ピクセル)
height Number 高さ(ピクセル)
radius Number 半径(ピクセル)
Returns:
Type
PIXI.Graphics

drawShape (shape) → {PIXI.Graphics}

角丸の四角形を描く。

Parameters:
Name Type Description
shape PIXI.Circle | PIXI.Ellipse | PIXI.Polygon | PIXI.Rectangle | PIXI.RoundedRectangle  
Returns:
Type
PIXI.Graphics

drawStar (x, y, points, radius, innerRadius, rotation) → {PIXI.Graphics}

星型の図形を描く。

Parameters:
Name Type Default Description
x Number   中心のx座標(ピクセル)
y Number   中心のy座標(ピクセル)
points Number   頂点の数
radius Number   半径(ピクセル)
innerRadius Number radius の半分 opt. 内側の半径(ピクセル)
rotation Number 0 opt. 回転角(ラジアン)
Returns:
Type
PIXI.Graphics

endFill () → {PIXI.Graphics}

Returns:
Type
PIXI.Graphics

endHole () → {PIXI.Graphics}

Returns:
Type
PIXI.Graphics

finishPoly () → {PIXI.Graphics}

Returns:
Type
PIXI.Graphics

generateCanvasTexture (scaleMode, resolution) → {PIXI.Texture}

Parameters:
Name Type Description
scaleMode Number PIXI.SCALE_MODES
resolution Number  
Returns:
Type
PIXI.Texture

isFastRect () → {Boolean}

Returns:
Type
Boolean

lineStyle (width, color, alpha, alignment, native) → {PIXI.Graphics}

Parameters:
Name Type Default Description
width Number 0 opt. 幅(ピクセル)
color Number 0 opt. 色
alpha Number 1 opt. 不透明度
alignment Number 0.5 opt.
native Boolean false opt.
Returns:
Type
PIXI.Graphics

lineTextureStyle (width, texture, color, alpha, matrix, alignment, native) → {PIXI.Graphics}

Parameters:
Name Type Default Description
width Number 0 opt. 幅(ピクセル)
texture PIXI.Texture PIXI.Texture.WHITE opt. テスクチャ
color Number 0 opt. 色
alpha Number 1 opt. 不透明度
matrix PIXI.Matrix null opt.
alignment Number 0.5 opt.
native Boolean false opt.
Returns:
Type
PIXI.Graphics

lineTo (x, y) → {PIXI.Graphics}

指定座標まで線を引く。

Parameters:
Name Type Description
x Number x座標(ピクセル)
y Number y座標(ピクセル)
Returns:
Type
PIXI.Graphics

moveTo (x, y) → {PIXI.Graphics}

指定座標まで描画位置を移動。

Parameters:
Name Type Description
x Number x座標(ピクセル)
y Number y座標(ピクセル)
Returns:
Type
PIXI.Graphics

quadraticCurveTo (cpX, cpY, toX, toY) → {PIXI.Graphics}

ベジェ曲線を引く。

Parameters:
Name Type Description
cpX Number コントロールポイントx座標(ピクセル)
cpY Number コントロールポイントy座標(ピクセル)
toX Number x座標(ピクセル)
toY Number y座標(ピクセル)
Returns:
Type
PIXI.Graphics

setMatrix (matrix) → {PIXI.Graphics}

Parameters:
Name Type Description
matrix PIXI.Matrix  
Returns:
Type
PIXI.Graphics

startPoly ()


Documentation generated by JSDoc 3.5.5

Menu

  • RPGツクールMV JavaScript 非公式リファレンス
  • Class: Array
  • Class: AudioManager
  • Class: BattleManager
  • Class: Bitmap
  • Class: CacheEntry
  • Class: CacheMap
  • Class: ConfigManager
  • Class: DataManager
  • Class: Decrypter
  • Class: Game_Action
  • Class: Game_ActionResult
  • Class: Game_Actor
  • Class: Game_Actors
  • Class: Game_Battler
  • Class: Game_BattlerBase
  • Class: Game_Character
  • Class: Game_CharacterBase
  • Class: Game_CommonEvent
  • Class: Game_Enemy
  • Class: Game_Event
  • Class: Game_Follower
  • Class: Game_Followers
  • Class: Game_Interpreter
  • Class: Game_Item
  • Class: Game_Map
  • Class: Game_Message
  • Class: Game_Party
  • Class: Game_Picture
  • Class: Game_Player
  • Class: Game_Screen
  • Class: Game_SelfSwitches
  • Class: Game_Switches
  • Class: Game_System
  • Class: Game_Temp
  • Class: Game_Timer
  • Class: Game_Troop
  • Class: Game_Unit
  • Class: Game_Variables
  • Class: Game_Vehicle
  • Class: Graphics
  • Class: Html5Audio
  • Class: ImageCache
  • Class: ImageManager
  • Class: Input
  • Class: JsonEx
  • Class: AudioParameters
  • Class: BattleLogMethod
  • Class: BattleRewards
  • Class: BattlerAnimation
  • Class: CommandItem
  • Class: ConfigData
  • Class: DatabaseFile
  • Class: Matrix
  • Class: Motion
  • Class: PluginSettings
  • Class: SaveContents
  • Class: SaveFileInfo
  • Class: TextState
  • Class: TouchInputEvents
  • Namespace: MV
  • Class: Math
  • Class: Number
  • Class: PIXI.Container
  • Class: PIXI.DisplayObject
  • Class: PIXI.Graphics
  • Class: PIXI.Sprite
  • Class: PluginManager
  • Class: Point
  • Class: Actor
  • Class: Timing
  • Class: Animation
  • Class: Armor
  • Class: AudioFile
  • Class: BaseItem
  • Class: Conditions
  • Class: BattleEventPage
  • Class: Learning
  • Class: Class
  • Class: CommonEvent
  • Class: Damage
  • Class: Effect
  • Class: Action
  • Class: DropItem
  • Class: Enemy
  • Class: EquipItem
  • Class: Event
  • Class: EventCommand
  • Class: Conditions
  • Class: Image
  • Class: EventPage
  • Class: Item
  • Class: Encounter
  • Class: Map
  • Class: MapInfo
  • Class: MetaData
  • Class: MoveCommand
  • Class: MoveRoute
  • Class: Skill
  • Class: State
  • Class: AttackMotion
  • Class: Terms
  • Class: TestBattler
  • Class: Vehicle
  • Class: System
  • Class: Tileset
  • Class: Trait
  • Class: Troop
  • Class: UsableItem
  • Class: Weapon
  • Namespace: RPG
  • Class: Rectangle
  • Class: RequestQueue
  • Class: ResourceHandler
  • Class: SceneManager
  • Class: Scene_Base
  • Class: Scene_Battle
  • Class: Scene_Boot
  • Class: Scene_Debug
  • Class: Scene_Equip
  • Class: Scene_File
  • Class: Scene_GameEnd
  • Class: Scene_Gameover
  • Class: Scene_Item
  • Class: Scene_ItemBase
  • Class: Scene_Load
  • Class: Scene_Map
  • Class: Scene_Menu
  • Class: Scene_MenuBase
  • Class: Scene_Name
  • Class: Scene_Options
  • Class: Scene_Save
  • Class: Scene_Shop
  • Class: Scene_Skill
  • Class: Scene_Status
  • Class: Scene_Title
  • Class: ScreenSprite
  • Class: ShaderTilemap
  • Class: SoundManager
  • Class: Sprite
  • Class: Sprite_Actor
  • Class: Sprite_Animation
  • Class: Sprite_Balloon
  • Class: Sprite_Base
  • Class: Sprite_Battler
  • Class: Sprite_Button
  • Class: Sprite_Character
  • Class: Sprite_Damage
  • Class: Sprite_Destination
  • Class: Sprite_Enemy
  • Class: Sprite_Picture
  • Class: Sprite_StateIcon
  • Class: Sprite_StateOverlay
  • Class: Sprite_Timer
  • Class: Sprite_Weapon
  • Class: Spriteset_Base
  • Class: Spriteset_Battle
  • Class: Spriteset_Map
  • Class: Stage
  • Class: StorageManager
  • Class: String
  • Class: TextManager
  • Class: Tilemap
  • Class: TilingSprite
  • Class: ToneFilter
  • Class: ToneSprite
  • Class: TouchInput
  • Class: Member
  • Class: Utils
  • Class: Weather
  • Class: WebAudio
  • Class: Window
  • Class: WindowLayer
  • Class: Window_ActorCommand
  • Class: Window_Base
  • Class: Window_BattleActor
  • Class: Window_BattleEnemy
  • Class: Window_BattleItem
  • Class: Window_BattleLog
  • Class: Window_BattleSkill
  • Class: Window_BattleStatus
  • Class: Window_ChoiceList
  • Class: Window_Command
  • Class: Window_DebugEdit
  • Class: Window_DebugRange
  • Class: Window_EquipCommand
  • Class: Window_EquipItem
  • Class: Window_EquipSlot
  • Class: Window_EquipStatus
  • Class: Window_EventItem
  • Class: Window_GameEnd
  • Class: Window_Gold
  • Class: Window_Help
  • Class: Window_HorzCommand
  • Class: Window_ItemCategory
  • Class: Window_ItemList
  • Class: Window_MapName
  • Class: Window_MenuActor
  • Class: Window_MenuCommand
  • Class: Window_MenuStatus
  • Class: Window_Message
  • Class: Window_NameEdit
  • Class: Window_NameInput
  • Class: Window_NumberInput
  • Class: Window_Options
  • Class: Window_PartyCommand
  • Class: Window_SavefileList
  • Class: Window_ScrollText
  • Class: Window_Selectable
  • Class: Window_ShopBuy
  • Class: Window_ShopCommand
  • Class: Window_ShopNumber
  • Class: Window_ShopSell
  • Class: Window_ShopStatus
  • Class: Window_SkillList
  • Class: Window_SkillStatus
  • Class: Window_SkillType
  • Class: Window_Status
  • Class: Window_TitleCommand
  • Global
  • クラスツリー