code logs -> 2015 -> Sat, 21 Mar 2015< code.20150320.log - code.20150322.log >
--- Log opened Sat Mar 21 00:00:42 2015
00:14 Orthia [orthianz@Nightstar-osp.c65.224.119.IP] has quit [Ping timeout: 121 seconds]
00:23
<&Derakon>
Oh, ToxicFrog: thanks for the Clojure help earlier. Same to you, McMartin.
00:23
<&ToxicFrog>
You're welcome
00:27 Orthia [orthianz@Nightstar-l2c.913.224.119.IP] has joined #code
00:27 mode/#code [+o Orthia] by ChanServ
00:49 Orthia [orthianz@Nightstar-l2c.913.224.119.IP] has quit [Ping timeout: 121 seconds]
00:59
<&McMartin>
Cheers
01:47 Orthia [orthianz@Nightstar-o3pulk.callplus.net.nz] has joined #code
01:47 mode/#code [+o Orthia] by ChanServ
02:03 AverageJoe [evil1@Nightstar-pqipp9.sd.cox.net] has joined #code
02:31 Turaiel[Offline] is now known as Turaiel
02:49 AverageJoe [evil1@Nightstar-pqipp9.sd.cox.net] has quit [[NS] Quit: Leaving]
04:08 Derakon is now known as Derakon[AFK]
04:29 celticminstrel [celticminst@Nightstar-gmujup.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
04:33 Alek [omegaboot@Nightstar-03ja8q.il.comcast.net] has quit [Connection reset by peer]
04:37 Alek [omegaboot@Nightstar-03ja8q.il.comcast.net] has joined #code
04:37 mode/#code [+o Alek] by ChanServ
05:19 Kindamoody[zZz] is now known as Kindamoody
05:48 AverageJoe [evil1@Nightstar-pqipp9.sd.cox.net] has joined #code
05:51 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
05:59 kourbou|actuallyzzz [holoirc@Nightstar-deqg8j.fbx.proxad.net] has quit [Connection closed]
06:13 AverageJoe [evil1@Nightstar-pqipp9.sd.cox.net] has quit [[NS] Quit: Leaving]
06:46 Red_Queen [Z@Nightstar-101.mee.63.87.IP] has quit [Ping timeout: 121 seconds]
06:57 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has quit [Connection closed]
07:38 Kindamoody is now known as Kindamoody|afk
07:46 Turaiel is now known as Turaiel[Offline]
12:38
< abudhabi>
Is there any better way to render vector graphics in Java than Graphics2D?
12:38
<&McMartin>
What scale of vector graphics are we talking here?
12:38
< abudhabi>
Spheres, ellipses and lines, mostly.
12:38
<&McMartin>
If you're rendering full 3D scenes, there are full bindings to things like OpenGL or 3D scene frameworks.
12:38
<&McMartin>
Ah, OK
12:38
<&McMartin>
Graphics2D is probably the way to go for that.
12:39
< abudhabi>
But Graphics2D appears to have awful scaling, and equally awful handling of sub-pixel coordinates.
12:41
<&McMartin>
Hrm. I vaguely recall an official API that used floating point for coordinates.
12:41
<&McMartin>
I'm about three major revisions out of date in Java
12:43
< abudhabi>
Some of the functions support FP, but some of the ones I need don't.
12:43
<&McMartin>
Are those the ones, perchance, that exist also in the Graphics superinterface~
12:43
< abudhabi>
Ionno.
12:44
<&McMartin>
Graphics is the old 1.0 not-really-good-enough API, Graphics2D is an attempt to extend that to be less awful while remaining compatible
12:44
<&McMartin>
Both of them are essentially for painting to custom widgets, which is a thing that OSes occasionally get cranky about in this age of actually functional direct rendering infrastructure
12:44
< abudhabi>
So what are my options? Should I use some kind of 3D thing to render my 2D?
12:45
<&McMartin>
Well
12:45
<&McMartin>
That's a lot of work
12:45
<&McMartin>
But it's also a very standard approach these days
12:45
<&McMartin>
Do you have a UI mockup or screenshot or anything?
12:45
<&McMartin>
A lot of my advice depends on exactly what kind of application this is.
12:47
<&McMartin>
(But I'll also add that I'm not aware of any 3D vector libraries that do ellipses well~)
12:48
< abudhabi>
http://i.imgur.com/Org7cfn.png
12:48
<&McMartin>
I'm getting removed.png there
12:48
< abudhabi>
http://i.imgur.com/Orq7cfn.png
12:49
<@Shiz>
beautiful AWT styling
12:50
<@Shiz>
protip: UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
12:50
<&McMartin>
Ok. This is about the usecase I'd use Graphics2D for, yeah
12:50
<@Shiz>
this should be mandatory code for everything that uses AWT/swing
12:50
<&McMartin>
FFS, I asked for a mockup, dude
12:50
<@Shiz>
lol
12:50
<&McMartin>
(This is the "Minesweeper/Chip's Challenge" usecase, for the record)
12:51
< abudhabi>
I'd be fine if it were just the subpixel that were shitty.
12:51
< abudhabi>
But I really need adequate scaling.
12:52
<&McMartin>
AffineTransform doesn't cover it?
12:52
<&McMartin>
(I've never attempted this)
12:52
< abudhabi>
How does that work?
12:52
< abudhabi>
I've been using .scale() which isn't what I want (it's a plain raster scale).
12:53
<&McMartin>
So, I'm incredibly rusty here, but
12:53
<&McMartin>
There's are Shape classes that you can pass to Draw, with names like Ellipse2D
12:53
<&McMartin>
Those can be run through AffineTransform objects to do stretching and scaling operations, and maybe also rotations?
12:54
<&McMartin>
And that gets you a new Shape that can then be drawn
12:54 * McMartin goes into random-walk research mode, o_Os. "Since when does Scala target LLVM?"
12:55
<&McMartin>
Answer: OK, maybe it doesn't.
12:55
<&ToxicFrog>
it does? holy shit
12:56
<&ToxicFrog>
oh :(
12:56
<&McMartin>
abudhabi: The official tutorial on this is http://docs.oracle.com/javase/tutorial/2d/advanced/transforming.html
12:56
<&McMartin>
I'm not sure if this is what you want
12:57
<&McMartin>
But I'm way too rusty here to be able to suggest useful best practices or anything :/
13:00
< abudhabi>
Well, thanks anyway.
13:00
< abudhabi>
I'll see if I can use this.
--- Log closed Sat Mar 21 13:07:55 2015
--- Log opened Sat Mar 21 13:19:25 2015
13:19 TheWatcher [chris@Nightstar-ksqup0.co.uk] has joined #code
13:19 Irssi: #code: Total of 37 nicks [22 ops, 0 halfops, 0 voices, 15 normal]
13:19 mode/#code [+o TheWatcher] by ChanServ
13:19 Irssi: Join to #code was synced in 35 secs
14:02 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
14:02 mode/#code [+o Checkmate] by ChanServ
15:26 Derakon[AFK] is now known as Derakon
15:38 celticminstrel [celticminst@Nightstar-gmujup.dsl.bell.ca] has joined #code
15:38 mode/#code [+o celticminstrel] by ChanServ
15:57 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
17:24 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
17:24 mode/#code [+qo Vornicus Vornicus] by ChanServ
17:50 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [Ping timeout: 121 seconds]
18:11 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
19:01 Checkmate [Z@Nightstar-g2q2tu.customer.tdc.net] has joined #code
19:01 mode/#code [+o Checkmate] by ChanServ
19:07 Vash [Vash@Nightstar-uhn82m.ct.comcast.net] has joined #code
19:07 mode/#code [+o Vash] by ChanServ
19:45 Turaiel[Offline] is now known as Turaiel
20:22 AverageJoe [evil1@Nightstar-pqipp9.sd.cox.net] has joined #code
21:09 celmin [celticminst@Nightstar-gmujup.dsl.bell.ca] has joined #code
21:10 mode/#code [+o celmin] by ChanServ
21:10 celticminstrel [celticminst@Nightstar-gmujup.dsl.bell.ca] has quit [Ping timeout: 121 seconds]
21:10 celmin is now known as celticminstrel
21:45 AverageJoe [evil1@Nightstar-pqipp9.sd.cox.net] has quit [[NS] Quit: Leaving]
21:58 AverageJoe [evil1@Nightstar-pqipp9.sd.cox.net] has joined #code
22:31 Checkmate [Z@Nightstar-g2q2tu.customer.tdc.net] has quit [Connection closed]
22:32 Checkmate [Z@Nightstar-g2q2tu.customer.tdc.net] has joined #code
22:32 mode/#code [+o Checkmate] by ChanServ
22:40 celticminstrel [celticminst@Nightstar-gmujup.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
23:11 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
23:11 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [Connection closed]
23:22 kourbou [holoirc@Nightstar-deqg8j.fbx.proxad.net] has joined #code
23:26 kourbou [holoirc@Nightstar-deqg8j.fbx.proxad.net] has quit [Connection closed]
23:27 kourbou [holoirc@Nightstar-deqg8j.fbx.proxad.net] has joined #code
23:27 Turaiel is now known as Turaiel[Offline]
--- Log closed Sun Mar 22 00:00:58 2015
code logs -> 2015 -> Sat, 21 Mar 2015< code.20150320.log - code.20150322.log >

[ Latest log file ]