Skip to content

Commit

Permalink
Standardize copyright headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
xStrom committed Feb 25, 2024
1 parent 30813de commit 035717e
Show file tree
Hide file tree
Showing 72 changed files with 201 additions and 20 deletions.
2 changes: 1 addition & 1 deletion piet-cairo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "piet-cairo"
version = "0.6.2"
authors = ["Raph Levien <[email protected]>"]
description = "Cairo backend for piet 2D graphics abstraction."
license = "MIT/Apache-2.0"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/linebender/piet"
readme = "../README.md"
edition = "2018"
Expand Down
3 changes: 3 additions & 0 deletions piet-cairo/benches/make_image.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2021 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

use cairo::{Context, Format, ImageSurface};
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use piet::{ImageFormat, RenderContext};
Expand Down
3 changes: 3 additions & 0 deletions piet-cairo/examples/test-picture.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Basic example of rendering on Cairo.

use std::fmt::Write as _;
Expand Down
3 changes: 3 additions & 0 deletions piet-cairo/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! The Cairo backend for the Piet 2D graphics abstraction.

#![deny(clippy::trivially_copy_pass_by_ref)]
Expand Down
3 changes: 3 additions & 0 deletions piet-cairo/src/text.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Text functionality for Piet cairo backend

use std::convert::TryInto;
Expand Down
2 changes: 1 addition & 1 deletion piet-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "piet-common"
version = "0.6.2"
authors = ["Raph Levien <[email protected]>"]
description = "Selection of a single preferred back-end for piet"
license = "MIT/Apache-2.0"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/linebender/piet"
readme = "README.md"
edition = "2018"
Expand Down
3 changes: 3 additions & 0 deletions piet-common/examples/mondrian.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2021 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! This example implements a generative algorithm for making pictures like
//! Piet Mondrian's squares.
// TODO: Remove all the wasm32 cfg guards once this compiles with piet-web
Expand Down
3 changes: 3 additions & 0 deletions piet-common/src/cairo_back.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

// allows e.g. raw_data[dst_off + x * 4 + 2] = buf[src_off + x * 4 + 0];
#![allow(clippy::identity_op)]

Expand Down
3 changes: 3 additions & 0 deletions piet-common/src/cg_back.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

// allows e.g. raw_data[dst_off + x * 4 + 2] = buf[src_off + x * 4 + 0];
#![allow(clippy::identity_op)]

Expand Down
3 changes: 3 additions & 0 deletions piet-common/src/direct2d_back.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Support for piet Direct2D back-end.

#[cfg(feature = "png")]
Expand Down
3 changes: 3 additions & 0 deletions piet-common/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! A piet backend appropriate for the current platform.
//!
//! This crate reexports the [piet crate][piet], alongside an appropriate backend
Expand Down
3 changes: 3 additions & 0 deletions piet-common/src/web_back.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Support for piet Web back-end.

use std::fmt;
Expand Down
3 changes: 3 additions & 0 deletions piet-common/tests/image.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

use kurbo::{Rect, Size};
use piet_common::*;

Expand Down
3 changes: 3 additions & 0 deletions piet-common/tests/text.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Basic conformance testing for text.

#[cfg(target_arch = "wasm32")]
Expand Down
2 changes: 1 addition & 1 deletion piet-coregraphics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "piet-coregraphics"
version = "0.6.2"
authors = ["Jeff Muizelaar <[email protected]>, Raph Levien <[email protected]>, Colin Rofls <[email protected]>"]
description = "CoreGraphics backend for piet 2D graphics abstraction."
license = "MIT/Apache-2.0"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/linebender/piet"
readme = "../README.md"
edition = "2018"
Expand Down
3 changes: 3 additions & 0 deletions piet-coregraphics/examples/test-picture.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Run the piet-test examples with the coregraphics backend.

use std::path::Path;
Expand Down
3 changes: 3 additions & 0 deletions piet-coregraphics/src/ct_helpers.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Wrappers around CF/CT types, with nice interfaces.

#![allow(clippy::upper_case_acronyms)]
Expand Down
3 changes: 3 additions & 0 deletions piet-coregraphics/src/gradient.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

#![allow(non_upper_case_globals)]

//! core graphics gradient support
Expand Down
3 changes: 3 additions & 0 deletions piet-coregraphics/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! The CoreGraphics backend for the Piet 2D graphics abstraction.

#![deny(clippy::trivially_copy_pass_by_ref)]
Expand Down
3 changes: 3 additions & 0 deletions piet-coregraphics/src/text.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Text related stuff for the coregraphics backend

use std::cell::RefCell;
Expand Down
2 changes: 1 addition & 1 deletion piet-direct2d/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "piet-direct2d"
version = "0.6.2"
authors = ["Raph Levien <[email protected]>"]
description = "Direct2D backend for piet 2D graphics abstraction."
license = "MIT/Apache-2.0"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/linebender/piet"
readme = "../README.md"
edition = "2018"
Expand Down
3 changes: 3 additions & 0 deletions piet-direct2d/examples/test-picture.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Basic example of rendering on Direct2D.

use std::path::Path;
Expand Down
3 changes: 3 additions & 0 deletions piet-direct2d/src/conv.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Conversions of types into Direct2D

use winapi::um::d2d1::{
Expand Down
3 changes: 3 additions & 0 deletions piet-direct2d/src/d2d.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Convenience wrappers for Direct2D objects.
//!
//! These also function as safety boundaries (though determining the
Expand Down
3 changes: 3 additions & 0 deletions piet-direct2d/src/d3d.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

use std::ptr::null_mut;

// TODO figure out whether to export this or to move `raw_pixels` into this module.
Expand Down
3 changes: 3 additions & 0 deletions piet-direct2d/src/dwrite.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Convenience wrappers for DirectWrite objects.

// TODO: get rid of this when we actually do use everything
Expand Down
3 changes: 3 additions & 0 deletions piet-direct2d/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Error conversion from D2D/DWrite to piet Error.

use std::fmt;
Expand Down
3 changes: 3 additions & 0 deletions piet-direct2d/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

#![cfg(windows)]
// allows for nice formatting for e.g. new_buf[i * 4 + 0] = premul(buf[i * 4 + 0, a)
#![allow(clippy::identity_op)]
Expand Down
3 changes: 3 additions & 0 deletions piet-direct2d/src/text.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Text functionality for Piet direct2d backend

mod lines;
Expand Down
3 changes: 3 additions & 0 deletions piet-direct2d/src/text/lines.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

use crate::dwrite;
use piet::{util, LineMetric};

Expand Down
2 changes: 1 addition & 1 deletion piet-svg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.6.2"
authors = ["Benjamin Saunders <[email protected]>"]
description = "SVG backend for piet 2D graphics abstraction."
edition = "2018"
license = "MIT/Apache-2.0"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/linebender/piet"
keywords = ["graphics", "2d"]
categories = ["rendering::graphics-api"]
Expand Down
3 changes: 3 additions & 0 deletions piet-svg/examples/basic-svg.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Basic example of rendering to a SVG

use std::io;
Expand Down
3 changes: 3 additions & 0 deletions piet-svg/src/evcxr.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2021 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Helpers to make the SVG output of `piet-svg` easier to use from within `evcxr_jupyter`.
//!
//! [`evcxr`] is a Rust REPL. It also provides a Rust kernel for the [Jupyter Notebook] through
Expand Down
3 changes: 3 additions & 0 deletions piet-svg/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! SVG output support for piet

#![deny(clippy::trivially_copy_pass_by_ref)]
Expand Down
3 changes: 3 additions & 0 deletions piet-svg/src/text.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Text functionality for Piet svg backend

use std::{
Expand Down
2 changes: 1 addition & 1 deletion piet-web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "piet-web"
version = "0.6.2"
authors = ["Raph Levien <[email protected]>"]
description = "Web canvas backend for piet 2D graphics abstraction."
license = "MIT/Apache-2.0"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/linebender/piet"
readme = "../README.md"
edition = "2018"
Expand Down
3 changes: 3 additions & 0 deletions piet-web/examples/basic/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Basic example of rendering in the browser

use wasm_bindgen::prelude::*;
Expand Down
3 changes: 3 additions & 0 deletions piet-web/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

// allows e.g. raw_data[dst_off + x * 4 + 2] = buf[src_off + x * 4 + 0];
#![allow(clippy::identity_op)]
#![deny(clippy::trivially_copy_pass_by_ref)]
Expand Down
3 changes: 3 additions & 0 deletions piet-web/src/text.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Text functionality for Piet web backend

mod grapheme;
Expand Down
3 changes: 3 additions & 0 deletions piet-web/src/text/grapheme.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

use piet::HitTestPoint;
use unicode_segmentation::UnicodeSegmentation;
use web_sys::CanvasRenderingContext2d;
Expand Down
3 changes: 3 additions & 0 deletions piet-web/src/text/lines.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

// currently basically copied and pasted from cairo backend, except cairo::ScaledFont is replaced
// by web_sys::CanvasRenderingContext2d
//
Expand Down
2 changes: 1 addition & 1 deletion piet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "piet"
version = "0.6.2"
authors = ["Raph Levien <[email protected]>"]
description = "An abstraction for 2D graphics."
license = "MIT/Apache-2.0"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/linebender/piet"
readme = "../README.md"
edition = "2018"
Expand Down
3 changes: 3 additions & 0 deletions piet/src/color.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! A simple representation of color

use std::fmt::{Debug, Formatter};
Expand Down
3 changes: 3 additions & 0 deletions piet/src/conv.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Conversions of fundamental numeric and geometric types.

use kurbo::Vec2;
Expand Down
3 changes: 3 additions & 0 deletions piet/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! The common error type for piet operations.

use std::fmt;
Expand Down
3 changes: 3 additions & 0 deletions piet/src/font.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Font families, weights, etcetera

use std::sync::Arc;
Expand Down
3 changes: 3 additions & 0 deletions piet/src/gradient.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Gradient specifications.
//!
//! We provide both linear and radial gradients; and for each flavor
Expand Down
15 changes: 2 additions & 13 deletions piet/src/image.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Copyright 2020 The Druid 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.
// Copyright 2020 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Types for working with images

Expand Down
3 changes: 3 additions & 0 deletions piet/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! A 2D graphics abstraction.
//!
//! This crate contains types and interfaces that represent a traditional 2D
Expand Down
3 changes: 3 additions & 0 deletions piet/src/null_renderer.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! A render context that does nothing.

use std::borrow::Cow;
Expand Down
3 changes: 3 additions & 0 deletions piet/src/render_context.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! The main render context trait.

use std::borrow::Cow;
Expand Down
3 changes: 3 additions & 0 deletions piet/src/samples/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Drawing examples for testing backends

#![allow(clippy::unnecessary_wraps)]
Expand Down
3 changes: 3 additions & 0 deletions piet/src/samples/picture_0.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2019 the Piet Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! A wide assortment of graphics meant to show off many different uses of piet

use crate::kurbo::{Affine, BezPath, Line, Point, Rect, RoundedRect, Size, Vec2};
Expand Down
Loading

0 comments on commit 035717e

Please sign in to comment.