<commit_before>package hxDaedalus.graphics.flambe;

import flambe.Component;
import flambe.display.FillSprite;
import flambe.display.Sprite;
import flambe.Entity;
import flambe.math.FMath;
import flambe.math.Point;
import flambe.math.Rectangle;

/**
 * Only for debugging purposes. Uses FillSprites to draw all things
 * 
 * @author <NAME> [mediamonks]
 */
class GraphicsComponent extends Component
{
	var _container:Entity;
	var _prevX:Float = 0;
	var _prevY:Float = 0;
	var _thickness:Float;
	var _color:Int;
	var _alpha:Float;

	public function new(thickness:Float = 1, color:Int = 0x000000, alpha:Float = 1) 
	{
		lineStyle(thickness, color, alpha);
		_container = new Entity().add(new Sprite());
	}	
	
	override public function onStart() 
	{
		owner.addChild(_container);
	}
	
	/**
	 * Specifies a line style used for subsequent calls to GraphicsComponent methods such as the lineTo() method or the drawCircle() method.
	 */
	public function lineStyle(thickness:Float = 1, color:Int = 0x000000, alpha:Float = 1)
	{
		_color = color;
		_thickness = thickness;
		_alpha = alpha;
	}
	
	/**
	 * Draws a solid rectangle.
	 */
	public function drawRect(x:Float, y:Float, width:Float, height:Float)
	{
		var shape = new FillSprite(_color, width, height)
			.setXY(x, y)
			.setAlpha(_alpha);
		
		shape.pixelSnapping = false;	<commit_msg>[Flambe]: disabled mouse/touch events on GraphicsComponent<commit_after>package hxDaedalus.graphics.flambe;

import flambe.Component;
import flambe.display.FillSprite;
import flambe.display.Sprite;
import flambe.Entity;
import flambe.math.FMath;
import flambe.math.Point;
import flambe.math.Rectangle;

/**
 * Only for debugging purposes. Uses FillSprites to draw all things
 * 
 * @author <NAME> [mediamonks]
 */
class GraphicsComponent extends Component
{
	var _container:Entity;
	var _prevX:Float = 0;
	var _prevY:Float = 0;
	var _thickness:Float;
	var _color:Int;
	var _alpha:Float;

	public function new(thickness:Float = 1, color:Int = 0x000000, alpha:Float = 1) 
	{
		lineStyle(thickness, color, alpha);
		var containerSprite = new Sprite();
		containerSprite.pointerEnabled = false;
		_container = new Entity().add(containerSprite);
	}	
	
	override public function onStart() 
	{
		owner.addChild(_container);
	}
	
	/**
	 * Specifies a line style used for subsequent calls to GraphicsComponent methods such as the lineTo() method or the drawCircle() method.
	 */
	public function lineStyle(thickness:Float = 1, color:Int = 0x000000, alpha:Float = 1)
	{
		_color = color;
		_thickness = thickness;
		_alpha = alpha;
	}
	
	/**
	 * Draws a solid rectangle.
	 */
	public function drawRect(x:Float, y:Float, width:Float, height:Float)
	{
		var shape = new FillSprite(_color, width, height)
			.setXY(x, y)
			.setAlpha(_alpha);
		
		shape.pixelSnapping = false;	
{'fraction_non_alphanumeric': 0.11035714285714286, 'fraction_numerical': 0.014285714285714285, 'mean_word_length': 4.355640535372849, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5758645', 'n_tokens_mistral': 1043, 'n_tokens_neox': 931, 'n_words': 254}