These are chat archives for AvaloniaUI/Avalonia

4th
Nov 2015
Nikita Tsukanov
@kekekeks
Nov 04 2015 01:37
@grokys Matrix.CreateRotation wants radians, RotationTransform wants degrees, ArcTo wants degrees
We need some unification
hacklex
@hacklex
Nov 04 2015 02:08
As much as we'd love unification, such unification will cause more chaos for those who will port their code to Perspex from, say, WPF.
in WPF, transforms and drawing methods expect degrees
and all general purpose math (System.Math) of course works with radians
Personally I think that degrees are only convenient for those not familiar with math
because one radian has natural meaning: one radian is an angle which corresponds to a unit circle arc with the unit length.
one degree, on the other hand, has no natural meaning, it is defined as 1/360 of a circle
Steven Kirk
@grokys
Nov 04 2015 11:20
@hacklex exactly. usually, radians are always used in the lower-level APIs, but higher-level APIs usually use degrees as they're more user-friendly
i personally find degrees far easier to use than radians because i'm not a maths person
and i know many many people will complain if we switch our higher-level APIs to radians!
hacklex
@hacklex
Nov 04 2015 11:37
nope, no switching to radians in UI and markup, totally
btw, our own arcto implementation is up and running
inside the EllipticalArc.cs are the Nine Circles of non-maths-persons' Hell hidden behind Five Seals of wrappers and helpers.
anyone willing to know what it takes to draw a proper elliptical arc at any given angle are welcome to check that out
hacklex
@hacklex
Nov 04 2015 11:42
but beware, as since that Luc guy was using it for comet orbits, the complexity of the code may, ehm, surprise unprepared minds.
Nikita Tsukanov
@kekekeks
Nov 04 2015 12:07

and i know many many people will complain if we switch our higher-level APIs to radians!

We can switch ArcTo to radians then

Since it's pretty low-level from my point of view
hacklex
@hacklex
Nov 04 2015 12:42
If we are taking WPF as an example, then ArcTo should expect degrees as well
Nikita Tsukanov
@kekekeks
Nov 04 2015 12:57
@grokys I've contacted one of JB guys, it seems that they haven't recieved your license application
Have you filled this form?
Nikita Tsukanov
@kekekeks
Nov 04 2015 13:08
@grokys Something weird happened on the build server, it can no longer find GTK# libs
I've restarted this build and it now fails so it's not related to code changes
Nikita Tsukanov
@kekekeks
Nov 04 2015 13:23
ARGH
Skia doesn't have built-in text layout engine
Nikita Tsukanov
@kekekeks
Nov 04 2015 13:30
Well, it does have some line-breaking support...
Steven Kirk
@grokys
Nov 04 2015 14:07
@kekekeks they did recieve it, they even sent me an email with a reference number
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:08
Would you provide me with that number
Or, even better, a screenshot
Steven Kirk
@grokys
Nov 04 2015 14:08
sure: 07092015/46162
Steven Kirk
@grokys
Nov 04 2015 14:14
strange about the CI - busy at work right now so haven't got time to look unfortunately
Wiesław Šoltés
@wieslawsoltes
Nov 04 2015 14:15
@grokys Did you have time to check by pull request #301 if its ok?
Steven Kirk
@grokys
Nov 04 2015 14:16
i didn't - will take a quick look now
yep, looks great!
merged - thanks loads for that!
Wiesław Šoltés
@wieslawsoltes
Nov 04 2015 14:18
No problem!
Wiesław Šoltés
@wieslawsoltes
Nov 04 2015 14:23
CI build failed again, maybe this will help : fslaborg/FSharp.Charting#48
juergenhoetzel/FSharp.Charting@cb828db
oh or better this :
install:
- appveyor DownloadFile http://download.xamarin.com/GTKforWindows/Windows/gtk-sharp-2.12.26.msi
- msiexec /i gtk-sharp-2.12.26.msi /qn /norestart
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:35
@grokys How are we doing text wrapping?
I don't see anything about it in FormattedText
Oh, I see, it's done using Constraint
Weston
@ronnyek
Nov 04 2015 14:37
so is building perspex an involved process to get setup, or pretty straightforward?
Steven Kirk
@grokys
Nov 04 2015 14:38
@ronnyek it should just be a matter of cloning the repos and building
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:38
git clone --recursive git@github.com:Perspex/Perspex.git
Weston
@ronnyek
Nov 04 2015 14:38
nice
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:38
Open in VS, build
You'll need GTK# installed to build GTK# backend
Weston
@ronnyek
Nov 04 2015 14:39
kinda mindboggling that gtk# is such an old version of gtk
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:40
Well, it's shipped with Mac version of Mono by default
Steven Kirk
@grokys
Nov 04 2015 14:40
people have been speaking about upgrading to gtk3 but it's never been quite clear to me where the .net bindings come from
Weston
@ronnyek
Nov 04 2015 14:41
xamarin
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:41
The main issue with GTK3 migration is that we'll have to ship binaries
Weston
@ronnyek
Nov 04 2015 14:41
whats his face the head of xamarin claims the gtk3+ stuff is all just niceties on the front end and stuff not actaul improvements
I think there were lots of efforts to get it updated, but dont think anything has been merged into head branches
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:42
GTK3 have some support for highdpi screens
We'll migrate once GTK3 will be installed by Mac Mono installer by default
Ubuntu has it packaged already
We might migrate to Aura windowing framework at that point, through
Weston
@ronnyek
Nov 04 2015 14:44
you totally should... there are no depdendencies on x with aura afaik
certainly would benefit me =)
although gtk does compile for wayland backend
gtk just feels a bit heavier than I'd think itd need to be
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:46
@grokys Bada-booom:
%xunit20%\xunit.console.x86 "C:\projects\perspex\tests\Perspex.RenderTests\bin\Release\Perspex.Cairo.RenderTests.dll" -appveyor
xUnit.net Console Runner (32-bit .NET 4.0.30319.42000)
  Discovering: Perspex.Cairo.RenderTests
  Discovered:  Perspex.Cairo.RenderTests
  Starting:    Perspex.Cairo.RenderTests
    Perspex.Cairo.RenderTests.Controls.ImageTests.Image_Stretch_None [FAIL]
      System.TypeInitializationException : The type initializer for 'Perspex.Cairo.RenderTests.TestBase' threw an exception.
      ---- System.TypeInitializationException : The type initializer for 'Perspex.Cairo.CairoPlatform' threw an exception.
      -------- System.DllNotFoundException : Unable to load DLL 'libglib-2.0-0.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
      Stack Trace:
           at Perspex.Cairo.RenderTests.TestBase..ctor(String outputPath)
        tests\Perspex.RenderTests\Controls\ImageTests.cs(21,0): at Perspex.Cairo.RenderTests.Controls.ImageTests..ctor()
        ----- Inner Stack Trace -----
        src\Gtk\Perspex.Cairo\CairoPlatform.cs(21,0): at Perspex.Cairo.CairoPlatform.Initialize()
        tests\Perspex.RenderTests\TestBase.cs(29,0): at Perspex.Cairo.RenderTests.TestBase..cctor()
        ----- Inner Stack Trace -----
           at GLib.Marshaller.g_malloc(UIntPtr size)
           at GLib.Marshaller.StringToPtrGStrdup(String str)
           at GLib.Global.set_ProgramName(String value)
           at Gtk.Application.SetPrgname()
           at Gtk.Application.Init()
        src\Gtk\Perspex.Cairo\CairoPlatform.cs(74,0): at Perspex.Cairo.CairoPlatform.CreatePangoContext()
        src\Gtk\Perspex.Cairo\CairoPlatform.cs(19,0): at Perspex.Cairo.CairoPlatform..cctor()
Weston
@ronnyek
Nov 04 2015 14:47
I wonder if skia has as mature tools for vector drawing as cairo does
considering cairo is vector first
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:48
Well, the only issue I've encountered so far is the lack of two-point radial gradients
And arcTo is oversimplified, but so is Cairo's one
Weston
@ronnyek
Nov 04 2015 14:48
I'm trying to think of a case where that would matter
you mean the issue with skia?
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:49
Well, @hacklex done some awesome job yesterday, so our current arcTo implementation is suitable for drawing comet orbits
Weston
@ronnyek
Nov 04 2015 14:49
do you guys already do the equivalent of baml with the xaml etc?
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:49

you mean the issue with skia?

yep

Weston
@ronnyek
Nov 04 2015 14:49
sweet
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:49

do you guys already do the equivalent of baml with the xaml etc?

nope

Weston
@ronnyek
Nov 04 2015 14:49
so deserialize from xml each load then or it gets compiled into some intermediate format
deserialize <-> parse
whatever
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:50
I don't see the point of using intermediate format
We might as well do C# code generation and merge compiled IL to resulting assembly
Weston
@ronnyek
Nov 04 2015 14:51
well... remember I'm coming from embedded background
(I agree)
there may be environmental constraints that prevent the memory usage or performance
but yeah
if theres a chance... even a remote chance you think skia could move could happen
I'm ready to commit any kidna code/testing/etc you guys could use... as it solves a big problem for me for mobile stuff
and if I can contribute tools that help non mobile stuff back
even better =)
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:53
Well, my personal aim is to replace Xamarin.Forms
Weston
@ronnyek
Nov 04 2015 14:53
thats their mobile cross platform shit right?
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:53
yep
Weston
@ronnyek
Nov 04 2015 14:53
beautiful
my goal is to displace android +)
not to sell, not to compete
but be able to have .net dev platform on anything that currently runs android
(steal kernel, steal drm drivers etc)
I've maintained android distributions and ported custom stuff to work, and frankly violated the ever loving crap out of androids infrastructure and kernel
I know android guts more than I care to =(
should the git clone have gotten stuff it needs for cairo?
Nikita Tsukanov
@kekekeks
Nov 04 2015 14:55
libhybris FTW
Weston
@ronnyek
Nov 04 2015 14:55
not finding pango/cairo
Weston
@ronnyek
Nov 04 2015 14:56
apologies brain fart on my part
forgot I was compiling in vm, on a mac
thinking I didnt need it
José Manuel Nieto
@SuperJMN
Nov 04 2015 14:58

Well, my personal aim is to replace Xamarin.Forms

Go go go!!!

Weston
@ronnyek
Nov 04 2015 14:58
and I even agree with that
xamarin forms is prohibitive pricing wise
José Manuel Nieto
@SuperJMN
Nov 04 2015 14:58

We might as well do C# code generation and merge compiled IL to resulting assembly

Agree!

Weston
@ronnyek
Nov 04 2015 14:59
and I'm not even confident that xamarin intends to really support much of the desktop a huge amount more than they are
Steven Kirk
@grokys
Nov 04 2015 15:01
@kekekeks : Unable to load DLL 'libglib-2.0-0.dll' -- thats our CI problem?
what's changed there?
José Manuel Nieto
@SuperJMN
Nov 04 2015 15:01

xamarin forms is prohibitive pricing wise

We should buy them

XD just kidding
I think its complaining it cant find/build Perspex.HtmlRenderer
weird
I just had to manually build
Wiesław Šoltés
@wieslawsoltes
Nov 04 2015 15:08
Had same problem yesterday with building HtmlRenderer
Nikita Tsukanov
@kekekeks
Nov 04 2015 15:12

@grokys

what's changed there?

It just stopped building GTK# stuff, so I've added GTK# installation step. Now it builds but tests fail

This message was deleted
@ronnyek
rebuild
Steven Kirk
@grokys
Nov 04 2015 19:02
@kekekeks hmm thinking about it, where did appveyor get the GTK libs from previously?
Nikita Tsukanov
@kekekeks
Nov 04 2015 19:07
no idea
Steven Kirk
@grokys
Nov 04 2015 19:09
tried adding start /wait to the gtk-install
nope, that didn't fix it... damn
Johan Larsson
@JohanLarsson
Nov 04 2015 19:13
what do you guys use for creating nuget packages?
Nikita Tsukanov
@kekekeks
Nov 04 2015 19:13
It's a sign... We should switch to skia :)
Steven Kirk
@grokys
Nov 04 2015 19:13
ahhh. it's because we need to add the dir to the PATH
only think i don't understand is how it worked before!
Nikita Tsukanov
@kekekeks
Nov 04 2015 19:14
Yeah, installed does this but PATH isn't updated for appveyor runner process
Steven Kirk
@grokys
Nov 04 2015 19:14
yep, happens when you first install gtk-sharp locally too...
gotta run, will do it tomorrow if you don't get chance before
Nikita Tsukanov
@kekekeks
Nov 04 2015 19:15
You either need to kill explorer.exe and restart VS or reboot
Steven Kirk
@grokys
Nov 04 2015 19:15
or manually add it
Nikita Tsukanov
@kekekeks
Nov 04 2015 19:45
@grokys JB guy said that they somehow missed your request
You should get your license soon
Johan Larsson
@JohanLarsson
Nov 04 2015 19:46
thanks for the link
Nikita Tsukanov
@kekekeks
Nov 04 2015 19:46
I recommend you to install Resharper 9.2 since 10 was released two days ago and is still unstable a bit
Steven Kirk
@grokys
Nov 04 2015 19:46
Yep, just received it, thanks for chasing that up!
Wiesław Šoltés
@wieslawsoltes
Nov 04 2015 19:48
Looks like Gtk is working in #303 but one test is failing, an its mine :(
Wiesław Šoltés
@wieslawsoltes
Nov 04 2015 20:12
Bez tytułu.png
Reason why Parse_Should_Accept_Relative_Value test is failing.
Wiesław Šoltés
@wieslawsoltes
Nov 04 2015 20:21
#303 should fixed Gtk tests and Parse_Should_Accept_Relative_Value test.