GFX
  • Docs
  • API
Search Results for

    Show / Hide Table of Contents
    • Genesis.Core
      • AssetManager
      • Game
      • GameElement
      • GameEventHandler
      • GenesisWindow
      • IGameBehavior
      • Input
      • Layer
      • Light
      • Scene
      • Scene3D
      • SceneEventHandler
      • SceneSizeEvenHandler
      • Storage
      • Utils
    • Genesis.Core.Behaviors
      • AnimationBehavior
      • CameraFlags
      • CharacterController2D
      • ControllerPreset
      • MoveDirection
      • MovementFlags
      • SpriteMovementController
    • Genesis.Core.Behaviors.Physics2D
      • BufferedSpriteCollider
      • PhysicsBox2D
      • PhysicsPolygon2D
      • Rigidbody2D
    • Genesis.Core.Behaviors.Physics3D
      • BoxCollider
      • CapsuleCollider
      • ConvexHullBehavior
      • QubeConvexHull
      • SphereCollider
      • StaticMeshBehavior
    • Genesis.Core.Behaviors._3D
      • Stance
      • ThirdpersonCharacterController
    • Genesis.Core.GameElements
      • BufferedSprite
      • CameraElement
      • Element3D
      • Empty
      • Model
      • ParticleBuffers
      • ParticleDeffinition
      • ParticleEmitter
      • Qube
      • RectElement
      • Skybox
      • Sprite
      • SpriteShapeDeffinition
      • Terrain2D
      • Terrain3D
      • TerrainData
    • Genesis.Graphics
      • Animation
      • Camera
      • CameraType
      • Face
      • Font
      • Framebuffer
      • Glyphe
      • IRenderDevice
      • Material
      • MaterialBuffer
      • Mesh
      • PerspectiveCamera
      • Shader
      • ShaderProgram
      • TexCoords
      • Texture
      • Viewport
    • Genesis.Graphics.Animation3D
      • Animation
      • Animator
      • AssimpNodeData
      • Bone
      • KeyPosition
      • KeyRotation
      • KeyScale
      • ModelMesh
      • boneinfo
      • vertex
    • Genesis.Graphics.Physics
      • BulletDebugRenderer
    • Genesis.Graphics.RenderDevice
      • ClassicGL
      • GLRenderer
    • Genesis.Graphics.Shaders.OpenGL
      • AnimatedModelShader
      • BasicShader
      • DiffuseLightning
      • DiffuseNormalLightning
      • DiffuseNormalShader
      • DiffuseShader
      • DiffuseSolidShader
      • MVPRectShader
      • MVPShader
      • MVPSolidShader
      • ParticleShader
      • ScreenShader
      • SkyboxShader
      • SpriteShader
      • TerrainShader
      • WireframeShader
    • Genesis.Graphics.Shapes
      • BufferedSpriteShape
      • FrameShape
      • GlypheShape
      • LineShape
      • PlaneShape
      • QubeShape
      • RectShape
      • Shape
      • SpriteShape
    • Genesis.Math
      • Matrix4x4
      • NoisePoint
      • PerlinNoise
      • Rect
      • Vec3
    • Genesis.Physics
      • Aabb
      • HitResult
      • MatrixSet
      • MouseRay2
      • PhysicHandler
      • PhysicHandlerEvent
      • PhysicPropeterys
      • PhysicsBehavior
      • PhysicsBehaviorEvent
      • PhysicsHandler2D
      • PhysicsHandler3D
      • Raycast
    • Genesis.UI
      • Canvas
      • ImageButton
      • Label
      • ListItem
      • ListItemBehavior
      • ListSelector
      • ListSelectorBehavior
      • Panel
      • ProgressBar
      • UIEvent
      • UIParseHandler
      • UIParser
      • Widget

    Class Viewport

    Represents a viewport used in graphics rendering.

    Inheritance
    object
    Viewport
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Genesis.Graphics
    Assembly: Genesis.dll
    Syntax
    public class Viewport

    Constructors

    Viewport()

    Default constructor for the Viewport class.

    Declaration
    public Viewport()

    Viewport(float, float)

    Constructor for the Viewport class that initializes the viewport with a specified width and height.

    Declaration
    public Viewport(float width, float height)
    Parameters
    Type Name Description
    float width

    The width of the viewport.

    float height

    The height of the viewport.

    Viewport(float, float, float, float)

    Constructor for the Viewport class that initializes the viewport with a specified X-coordinate, Y-coordinate, width, and height.

    Declaration
    public Viewport(float x, float y, float width, float height)
    Parameters
    Type Name Description
    float x

    The X-coordinate of the viewport.

    float y

    The Y-coordinate of the viewport.

    float width

    The width of the viewport.

    float height

    The height of the viewport.

    Properties

    Height

    Gets or sets the height of the viewport.

    Declaration
    public float Height { get; set; }
    Property Value
    Type Description
    float

    Width

    Gets or sets the width of the viewport.

    Declaration
    public float Width { get; set; }
    Property Value
    Type Description
    float

    X

    Gets or sets the X-coordinate of the viewport.

    Declaration
    public float X { get; set; }
    Property Value
    Type Description
    float

    Y

    Gets or sets the Y-coordinate of the viewport.

    Declaration
    public float Y { get; set; }
    Property Value
    Type Description
    float

    Methods

    GetSize()

    Gets the size of the viewport as a System.Drawing.Size.

    Declaration
    public Size GetSize()
    Returns
    Type Description
    Size

    The size of the viewport as a System.Drawing.Size.

    GetSizeF()

    Gets the size of the viewport as a System.Drawing.SizeF.

    Declaration
    public SizeF GetSizeF()
    Returns
    Type Description
    SizeF

    The size of the viewport as a System.Drawing.SizeF.

    SetNewViewport(float, float)

    Sets a new width and height for the viewport.

    Declaration
    public void SetNewViewport(float width, float height)
    Parameters
    Type Name Description
    float width

    The new width of the viewport.

    float height

    The new height of the viewport.

    In this article
    Back to top Generated by DocFX