<commit_before>﻿using System;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.Extended.TextureAtlases;

namespace MonoGame.Extended.Sprites
{
    public class Sprite
    {
        public Sprite(TextureRegion2D textureRegion)
        {
            if (textureRegion == null) throw new ArgumentNullException("textureRegion");

            _textureRegion = textureRegion;

            Color = Color.White;
            IsVisible = true;
            Scale = Vector2.One;
            Effect = SpriteEffects.None;
            OriginNormalized = new Vector2(0f, 0f);
        }

        public Sprite(Texture2D texture)
            : this(new TextureRegion2D(texture))
        {
        }

        public Color Color { get; set; }
        public bool IsVisible { get; set; }
        public Vector2 Position { get; set; }
        public Vector2 Scale { get; set; }
        public float Rotation { get; set; }
        public Vector2 Origin { get; set; }
        public SpriteEffects Effect { get; set; }
        public object Tag { get; set; }

        private TextureRegion2D _textureRegion;
        public TextureRegion2D TextureRegion
        {
            get { return _textureRegion; }
            set
            {
                if (value == null)
                    throw new InvalidOperationException("TextureRegion cannot be null");
<commit_msg>reverted sprite origin to center. at least for the moment to get tests passing again.<commit_after>﻿using System;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.Extended.TextureAtlases;

namespace MonoGame.Extended.Sprites
{
    public class Sprite
    {
        public Sprite(TextureRegion2D textureRegion)
        {
            if (textureRegion == null) throw new ArgumentNullException("textureRegion");

            _textureRegion = textureRegion;

            Color = Color.White;
            IsVisible = true;
            Scale = Vector2.One;
            Effect = SpriteEffects.None;
            OriginNormalized = new Vector2(0.5f, 0.5f);
        }

        public Sprite(Texture2D texture)
            : this(new TextureRegion2D(texture))
        {
        }

        public Color Color { get; set; }
        public bool IsVisible { get; set; }
        public Vector2 Position { get; set; }
        public Vector2 Scale { get; set; }
        public float Rotation { get; set; }
        public Vector2 Origin { get; set; }
        public SpriteEffects Effect { get; set; }
        public object Tag { get; set; }

        private TextureRegion2D _textureRegion;
        public TextureRegion2D TextureRegion
        {
            get { return _textureRegion; }
            set
            {
                if (value == null)
                    throw new InvalidOperationException("TextureRegion cannot be null");

{'fraction_non_alphanumeric': 0.07633587786259542, 'fraction_numerical': 0.009021512838306732, 'mean_word_length': 2.018848167539267, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5702680', 'n_tokens_mistral': 764, 'n_tokens_neox': 736, 'n_words': 220}