<commit_before>/**
 * Copyright 2010 The PlayN Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package playn.core;

/**
 * A 2d drawing canvas.
 *
 * <p>
 * Colors are specified as integer ARGB values, with alpha in the
 * most-significant byte.
 * </p>
 *
 * <p>
 * All methods that modify the Canvas return it to allow calls to be chained.
 * </p>
 *
 * TODO: - alpha (Flash and Java2D implementations are tricky). - textAlign?
 *
 * TODO (maybe): - textBaseline? Don't see it in Android. - font? Abstracting
 * this is going to be tricky. - measureText? Canvas API is pretty anemic, but
 * would be easy to implement on Android/Flash. - pattern repetition flags? Not
 * clear that Flash supports them.
 *
 * Notes: - Clipping is going to be tricky in Flash. It requires that a separate
 * DisplayObject be used as a "mask". I think this can be made to work with this
 * API, but I'm not sure.
 */
public interface Canvas {

  /**
   * Values that may be used with
   * {@link Canvas#setCompositeOperation(Composite)}.<commit_msg>Nixed some comment cruft.<commit_after>/**
 * Copyright 2010 The PlayN Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package playn.core;

/**
 * A 2d drawing canvas.
 *
 * <p>
 * Colors are specified as integer ARGB values, with alpha in the
 * most-significant byte.
 * </p>
 *
 * <p>
 * All methods that modify the Canvas return it to allow calls to be chained.
 * </p>
 */
public interface Canvas {

  /**
   * Values that may be used with
   * {@link Canvas#setCompositeOperation(Composite)}.
{'fraction_non_alphanumeric': 0.08807482462977397, 'fraction_numerical': 0.0074045206547155105, 'mean_word_length': 3.4643478260869567, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5605717', 'n_tokens_mistral': 723, 'n_tokens_neox': 691, 'n_words': 349}