Skip to content

Commit

Permalink
Kebabify comments (#69)
Browse files Browse the repository at this point in the history
* Kebabify comments

* feedback
  • Loading branch information
Erik Corry authored Dec 11, 2023
1 parent e74f65e commit c01acc6
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions src/common.toit
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ abstract class Canvas:
If the $palette argument is shorter than the highest index in the pixmap,
then pixels with high indices are assumed to be gray-scale with the
index representing the gray value (white = 0xff).
The $orientation argument can be ORIENTATION_0, ORIENTATION_90,
ORIENTATION_180, or ORIENTATION_270, from "import bitmap",
The $orientation argument can be $ORIENTATION-0, $ORIENTATION-90,
$ORIENTATION-180, or $ORIENTATION-270, from "import bitmap",
representing anti-clockwise rotation of the drawn pixmap.
Using $source-line-stride a number of bytes can be skipped at the
end of each line. This is useful if the pixmap is padded, or
Expand All @@ -254,8 +254,8 @@ abstract class Canvas:
the red, green, or blue component of the pixel. The order of the pixmap
is as in PNG, so the lines are ordered from top to bottom, and within each
line the bytes are ordered from left to right.
The $orientation argument can be ORIENTATION_0, ORIENTATION_90,
ORIENTATION_180, or ORIENTATION_270, from "import bitmap",
The $orientation argument can be $ORIENTATION-0, $ORIENTATION-90,
$ORIENTATION-180, or $ORIENTATION-270, from "import bitmap",
representing anti-clockwise rotation of the drawn pixmap.
This method is only available on true-color canvases.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/one_byte.toit
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ abstract class OneByteCanvas_ extends Canvas:
return
// Unfortunately one of the alpha values is not 0 or 0xff, so we can't use
// the bitmap draw primitive. We can blow it up to bytes, then use the
// bitmap_draw_bytemap.
// bitmap-draw-bytemap.
h := (pixels.size + source-line-stride - source-byte-width ) / source-line-stride
bytemap := ByteArray source-width * h
bitmap-draw-bitmap 0 0
Expand Down
2 changes: 1 addition & 1 deletion src/pixel_display.toit
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ abstract class PixelDisplay implements Window:
inner-height: return driver_.width

// Need-to-redraw is tracked as a bit array of dirty bits, arranged in
// SSD1306 layout so we can use bitmap_rectangle to invalidate areas.
// SSD1306 layout so we can use bitmap-rectangle to invalidate areas.
// One bit in the dirty map covers an area of 8x8 pixels of the display.
static CLEAN_ ::= 0
static DIRTY_ ::= 1
Expand Down
2 changes: 1 addition & 1 deletion src/style.toit
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ class RoundedCornerOpacity_:
return new

static TABLE-SIZE_/int ::= 256
// The heights of a top-right quarter circle of radius [TABLE_SIZE_].
// The heights of a top-right quarter circle of radius [TABLE-SIZE_].
static QUARTER-CIRCLE_/ByteArray ::= create-quarter-circle-array_ TABLE-SIZE_

static create-quarter-circle-array_ size -> ByteArray:
Expand Down
4 changes: 2 additions & 2 deletions src/true_color.toit
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Canvas_ extends Canvas:
super width height

stringify:
return "true_color.Canvas_ $(width_)x$height_"
return "true-color.Canvas_ $(width_)x$height_"

set-all-pixels color/int -> none:
bytemap-zap red_ (red-component color)
Expand Down Expand Up @@ -143,7 +143,7 @@ class Canvas_ extends Canvas:
return
// Unfortunately one of the alpha values is not 0 or 0xff, so we can't use
// the bitmap draw primitive. We can blow it up to bytes, then use the
// bitmap_draw_bytemap.
// bitmap-draw-bytemap.
h := (pixels.size + source-line-stride - source-byte-width) / source-line-stride
bytemap := ByteArray source-width * h
bitmap-draw-bitmap 0 0
Expand Down
2 changes: 1 addition & 1 deletion tests/gradient_bounds_visualized.toit
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ main args:

display.draw

// Rotate all gradient_elements 30 degrees.
// Rotate all gradient-elements 30 degrees.
angle := 30
gradient-elements.do:
it.background = GradientBackground --angle=angle --specifiers=it.background.specifiers
Expand Down
8 changes: 4 additions & 4 deletions tests/style_test.toit
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ toit-doc-examples-test:
"fish-or-fowl": Style --color=0xffffff --background=0x606060,
}

/// Test a literal element tree can be constructed and get_element_by_id can be
/// used to find a named element.
/// Test a literal element tree can be constructed and
/// $Element.get-element-by-id can be used to find a named element.
element-tree-test:
elements := Div [
Square --id="first-square",
Expand All @@ -53,8 +53,8 @@ element-tree-test:
first := elements.get-element-by-id "first-square"
expect first.id == "first-square"

/// Test that we can use set_styles to distribute the styles to all the
/// elements.
/// Test that we can use $Element.set-styles to distribute the styles to all
/// the elements.
combine-test:
elements := Div [
Div --id="special" [
Expand Down
2 changes: 1 addition & 1 deletion tests/toit-png-tools

0 comments on commit c01acc6

Please sign in to comment.