Пример #1
0
        //public abstract bool zbuffer();
        //public abstract void set_zbuffer(bool zbuffer);

        //public abstract bool texture_filter();
        //public abstract void set_texture_filter(bool filter);

        //C++ TO C# CONVERTER WARNING: 'const' methods are not available in C#:
        //ORIGINAL LINE: virtual Rect caption_rect() const= 0;
        //public abstract Rect caption_rect();
        //public abstract void set_caption_rect(Rect rc);

        //C++ TO C# CONVERTER WARNING: 'const' methods are not available in C#:
        //ORIGINAL LINE: virtual bool hide_mouse() const = 0;
        //public abstract bool hide_mouse();
        //public abstract void set_hide_mouse(bool hide);

        //C++ TO C# CONVERTER WARNING: 'const' methods are not available in C#:
        //ORIGINAL LINE: virtual bool deactivated_on_focus_change() const= 0;
        //public abstract bool deactivated_on_focus_change();
        //public abstract void set_deactivated_on_focus_change(bool deactivated);

        //public abstract void set_world_matrix();
        //public abstract void set_view_matrix(float width, float height);
        //public abstract void set_projection_matrix(int width, int height);


        public Render_Texture add_texture(System.Drawing.Bitmap bitmap)
        {
            if (m_D3DDevice == null)
            {
                return(null);
            }

            d3d_texture texture = new d3d_texture();

            texture._Texture = CreateDirectXTexture(bitmap, this.m_D3DDevice);
            texture._Sprite  = new Microsoft.DirectX.Direct3D.Sprite(m_D3DDevice);

            return(texture);
        }
Пример #2
0
        //public abstract void remove_texture(Render_Texture tex);
        //public abstract void remove_texture(string name);
        //public abstract void remove_all_texture();

        public void render_image(Render_Texture texture, Rect srcRect, Rect destRect, Point hot, double rotation)
        {
            d3d_texture d3dTexture = (d3d_texture)texture;

            if (hot == null)
            {
                hot = new Point(srcRect.width() / 2, srcRect.height() / 2);
            }

            //if( rotation == 0 )
            //    rotateOffset = new System.Drawing.Point(0,0);

            render_image(d3dTexture._Sprite, d3dTexture._Texture, hot, rotation, (int)destRect.origin_.x_, (int)destRect.origin_.y_, (int)destRect.width(), (int)destRect.height(), (int)srcRect.origin_.x_, (int)srcRect.origin_.y_, (int)srcRect.width(), (int)srcRect.height(), 255);
        }