<commit_before>package jkanvas;

import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;

/**
 * The paint context provides information of the state of drawing. Methods for
 * converting lengths and points from canvas coordinates to component
 * coordinates are provided.
 * 
 * @author Joschi <<EMAIL>>
 */
public interface KanvasContext {

  /**
   * Converts a point from canvas to component coordinates.
   * 
   * @param p The point in canvas coordinates.
   * @return The point in component coordinates.
   */
  Point2D toComponentCoordinates(Point2D p);

  /**
   * Converts a length from canvas to component coordinates.<commit_msg>zomm factor java-doc<commit_after>package jkanvas;

import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;

/**
 * The paint context provides information of the state of drawing. Methods for
 * converting lengths and points from canvas coordinates to component
 * coordinates are provided. In order to retrieve the current zoom factor the
 * method {@link #toComponentLength(double)} can be used.
 * 
 * @author Joschi <<EMAIL>>
 */
public interface KanvasContext {

  /**
   * Converts a point from canvas to component coordinates.
   * 
   * @param p The point in canvas coordinates.
   * @return The point in component coordinates.
   */
  Point2D toComponentCoordinates(Point2D p);

  /**
   * Converts a length from canvas to component coordinates. A call of
   * <code>toComponentLength(1)</code> returns the current zoom factor by means
   * of a unit length on the canvas represented in component coordinates.
{'fraction_non_alphanumeric': 0.08030480656506447, 'fraction_numerical': 0.006447831184056272, 'mean_word_length': 3.9622093023255816, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4111575', 'n_tokens_mistral': 473, 'n_tokens_neox': 461, 'n_words': 182}