Emil Ernerfeldt
bb7ff84db5
round font size earlier
2022-01-22 23:01:15 +01:00
Emil Ernerfeldt
1aceaefba3
Implement user-named TextStyle:s
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
4f98f26fda
Make TextStyle !Copy
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
0df77d9074
Round font sizes to whole pixels before deduplicating them
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
67c58ace27
Put FontsImpl and GalleyCache behind the same Mutex
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
93d5e222db
Remove RwLock around Font::characters
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
2fe3dd0c58
Remove mutex for Font::glyph_info_cache
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
b0196527e5
Wrap Fonts in a Mutex
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
d70c80569f
Replace indexing in Fonts with member function
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
0a15163fab
Refactor text layout: don't need &Fonts in all functions
2022-01-22 18:30:13 +01:00
Emil Ernerfeldt
462f181db3
Partial font texture update ( #1149 )
2022-01-22 11:23:12 +01:00
Emil Ernerfeldt
199bbef77b
Add misc documentation
2022-01-22 09:07:41 +01:00
Mingun
87ae77aab0
Add some improvements in the documentation ( #1056 )
...
* Better documentation for align.rs
* Document some painting methods
* Fix broken intra-doc links
* Add some internal documentation for Window TitleBar
2022-01-16 22:06:28 +01:00
Emil Ernerfeldt
66d80e2519
Texture loading in egui ( #1110 )
...
* Move texture allocation into epaint/egui proper
* Add TextureHandle
* egui_glow: cast using bytemuck instead of unsafe code
* Optimize glium painter
* Optimize WebGL
* Add example of loading an image from file
2022-01-15 13:59:52 +01:00
Emil Ernerfeldt
d5673412dd
Put everything in Context behind the same Mutex ( #1050 )
...
* Move all interior mutability from Context to CtxRef and make it a handle
* Rename `CtxRef` to `Context`
* The old `Context` is now `ContextImpl` and is non-pub
* Add benchmark Painter::rect
Co-authored-by: Daniel Keller <dklr433@gmail.com>
2022-01-10 23:13:10 +01:00
Emil Ernerfeldt
342737e2f0
Improve a couple of docstrings
2022-01-08 11:15:15 +01:00
Lampsitter
d31f7d6522
Faster dashed line generation ( #1027 )
...
* Faster dashed lines generation
* Add dashed_line benchmark
2022-01-06 10:44:53 +01:00
Emil Ernerfeldt
0960f38552
Add inter-linking between different forms of documentations and examples
2021-12-29 21:44:48 +01:00
Emil Ernerfeldt
0146c7e7fc
Release 0.16.0 - Context menus and rich text
2021-12-29 12:07:05 +01:00
Emil Ernerfeldt
190c85a40f
Rename Texture
to FontImage
2021-12-28 21:19:24 +01:00
Emil Ernerfeldt
d5efa4bbca
1.56 fix: missing_crate_level_docs -> rusdoc::missing_crate_level_docs
2021-12-26 09:56:14 +01:00
Emil Ernerfeldt
c60d17b91b
Set MSRV to 1.56.0 and use rust edition 2021 ( #998 )
2021-12-25 19:32:25 +01:00
Jan Haller
5ec14867c8
OrderedFloat refactor ( #918 )
...
* Move egui/util/float_ord.rs -> epaint/util/ordered_float.rs
* Implement Hash on OrderedFloat
* Generic OrderedFloat<T>; impl Hash; documentation
2021-12-11 13:52:23 +01:00
Emil Ernerfeldt
5fee6b7bc5
Anti-alias path ends ( #893 )
...
Closes https://github.com/emilk/egui/issues/876
2021-11-14 17:23:51 +01:00
Emil Ernerfeldt
951ee4e142
Improve color picker cache ( #886 )
...
* colorpicker: try to maintain hue even when saturation goes to zero
* More consistent arguments to color types
* implement `Hash` for `Rgba`.
2021-11-07 21:11:42 +01:00
Emil Ernerfeldt
878eddd546
When using a custom font you can now specify a font index ( #873 )
...
When using a custom font you can now specify a font index
Closes https://github.com/emilk/egui/issues/853
2021-11-07 19:47:52 +01:00
Emil Ernerfeldt
09b8269326
Rich text for all widgets ( #855 )
...
Introduce `RichText` and `WidgetText`
2021-11-01 21:30:10 +01:00
Emil Ernerfeldt
78dfde40b2
Remove deprecated functions
2021-10-30 09:46:06 +02:00
Emil Ernerfeldt
ddd52f47c5
Add tessellation option to toggle rounding text to pixel coordinates
...
On by default and only there for testing
2021-10-27 08:56:06 +02:00
Emil Ernerfeldt
8e4fd942a9
Refactor memory data ( #836 )
...
This refactors the widget state storage introduced by @optozorax in https://github.com/emilk/egui/pull/257
* Unify the four buckets (`data`, `data_temp`, `id_data` and `id_data_temp`) into a single `data`.
* Less complexity, and also less chance of error (storing in one bucket, reading from another).
* Store data by `Id` and `TypeId`.
* Users can thus reuse the same `Id` to store many types.
* Uses a simple xor of id and typeid, which is fast and good since both id and typeid are already high-entropy hashes.
* Use different suffixes on the functions to pick if you want the data persisted or not (`get_temp`, `insert_persisted`, etc).
* Writing with one suffix and reading with the other works.
* To store state not bound to a specific `Id` (i.e. only based on type), use the new `Id::null` as the key.
2021-10-27 08:51:34 +02:00
Emil Ernerfeldt
08cc07bb2d
Release 0.15.0 - Syntax highlighting, hscroll, egui-winit and egui_glow
2021-10-24 16:15:07 +02:00
Emil Ernerfeldt
4ace85b780
Fix: '\t' always take up the width of four spaces
2021-10-23 14:38:26 +02:00
Emil Ernerfeldt
2a9037cd90
Clean up epaint mutex code
2021-10-20 22:24:34 +02:00
Emil Ernerfeldt
dd50cba9a7
Optimize debug builds
2021-10-20 21:58:35 +02:00
Emil Ernerfeldt
d97a369c44
End statements with semicolon (clippy::semicolon_if_nothing_returned)
2021-10-20 16:46:57 +02:00
Emil Ernerfeldt
a0cd41755e
Add more clippy lints
2021-10-20 16:30:39 +02:00
Emil Ernerfeldt
087c6695bb
Handle having no fonts (missing "default_fonts" feature) without a crash
2021-10-20 15:40:06 +02:00
Emil Ernerfeldt
1f5cd482f6
Replace ProggyClean.ttf with Hack-Regular.ttf as default monospace font ( #802 )
...
https://github.com/source-foundry/Hack , MIT license
2021-10-17 20:49:28 +02:00
Emil Ernerfeldt
6f699b3391
Replace every ... with … like some sort of crazy person
...
Also fix some small typos
Closes https://github.com/emilk/egui/pull/736
2021-10-13 11:52:34 +02:00
Emil Ernerfeldt
1ab61ce9bb
Implement bytemuck for epaint::Rgba
...
Closes https://github.com/emilk/egui/pull/784
2021-10-13 08:56:34 +02:00
Emil Ernerfeldt
e547b149ca
Improve docs, especially of epaint, and add epaint/CHANGELOG.md
2021-10-10 15:35:13 +02:00
Emil Ernerfeldt
22a3a75eb5
Optimization: replace HashSet uses with AHashSet
2021-10-09 14:15:45 +02:00
Stock84
cd2227814f
Implement bytemuck
behind a feature ( #775 )
2021-10-07 22:30:15 +02:00
Emil Ernerfeldt
a1bf5aff47
Add Memory::caches for caching things from one frame to the next
2021-10-06 17:54:45 +02:00
Emil Ernerfeldt
f59abd9684
Clean up some macro syntax
2021-10-02 21:08:00 +02:00
Emil Ernerfeldt
5539dbe620
Add separate serialize feature and better persitence control ( #753 )
...
* Rename epaint feature "persistence" to "serialize"
* Add separate "serialize" feature to egui
* egui_demo_lib: separate serialize and persistence features
* Add App::persist_native_window and App::persist_egui_memory
Controls what gets persisted
2021-09-29 08:45:13 +02:00
Emil Ernerfeldt
d9db768180
Optimize tessellator: pass options by reference
2021-09-28 18:00:01 +02:00
Emil Ernerfeldt
2e83e36146
Use ahash for Id and other things that need hashing
2021-09-28 17:56:24 +02:00
Emil Ernerfeldt
1b36863248
Split out new crate egui-winit from egui_glium ( #735 )
2021-09-28 17:33:28 +02:00
Emil Ernerfeldt
ba0e3780a1
Add epaint::util::hash function for hashing a value
2021-09-26 03:16:12 +02:00