Sha256: 28be4e4a4d08550cc041039af592ae8796d2f558eb9c37b4ebfc92dbe3eb301a

Contents?: true

Size: 710 Bytes

Versions: 34

Compression:

Stored size: 710 Bytes

Contents

---
layout: post
title:  "sketch_title"
permalink: methods/sketch_title.html
---
The `sketch_title` method is probably unique to propane and JRubyArt, it is a convenient way to set the title of the sketch frame. Normally you only want to set the title once, so sensible it belongs in the setup definition.

```ruby
def setup
  sketch_title 'My sketch'
end
```

Should you want a dynamic readout of say `frame_rate`, put it in the draw loop (however there will most likely be some sort of performance penalty) eg:-

```ruby

TITLE_FORMAT = 'frame: %d - fps %0.2f'.freeze
  # ... some code
def draw
  sketch_title(format(TITLE_FORMAT, frame_count, frame_rate)) if frame_count % 10 == 0
  # ... some code
end
```

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
picrate-2.5.2-java docs/_methods/sketch_title.md
picrate-2.5.1-java docs/_methods/sketch_title.md
picrate-2.5.0-java docs/_methods/sketch_title.md
picrate-2.4.2-java docs/_methods/sketch_title.md
picrate-2.4.1-java docs/_methods/sketch_title.md
picrate-2.4.0-java docs/_methods/sketch_title.md
picrate-2.3.0-java docs/_methods/sketch_title.md
picrate-2.2.0-java docs/_methods/sketch_title.md
picrate-2.1.2-java docs/_methods/sketch_title.md
picrate-2.1.1-java docs/_methods/sketch_title.md
picrate-2.1.0-java docs/_methods/sketch_title.md
picrate-2.0.1-java docs/_methods/sketch_title.md
picrate-1.3.0-java docs/_methods/sketch_title.md
picrate-2.0.0.pre-java docs/_methods/sketch_title.md
picrate-1.2.4-java docs/_methods/sketch_title.md
picrate-1.2.3-java docs/_methods/sketch_title.md
picrate-1.2.2-java docs/_methods/sketch_title.md
picrate-1.2.1-java docs/_methods/sketch_title.md
picrate-1.2.0-java docs/_methods/sketch_title.md
picrate-1.1.0-java docs/_methods/sketch_title.md