Hi,
I have finally finished the first part of my visualization project of political discourses on Twitter. You can see the details here: http://mutabit.com/offray/static/blog/output/posts/visualizing-politicianspolitical-discourses-on-twitter.html (As you can see Pharo was not used to extract the data, just to scrap it, structure it and visualize it). The politicians tag cloud look nice if the background is white, because the png background is transparent, but if you share it on Twitter, the black background makes the tag cloud invisible. I could use image editing programs to change the background from transparent to white, but I would like to know if there is a way to make that change inside Pharo/Roasal. Thanks for all your support in making this ideas possible. Cheers, Offray |
I think there is a bug in the exporter, because the canvas has a color (which is white and _not_ transparent). Normally you can set the color of the of the canvas (view canvas color: Color purple), but the default exporter (I assume you are exporting it via GT-inspector) is ignoring it. There is however second exporter which you can use ~~~~~~~~~~~~~~~~~~~~~ |v fileName| v := RTView new. v canvas color: Color purple. v addAll: (RTEllipse new color: Color black; size: 30; elementsOn: (1 to: 10)). RTCircleLayout on: v elements. fileName := UITheme builder fileSave: 'Enter the PNG file name' extensions: #('png') path: nil. "fileName := '/tmp/test.png' asFileReference." fileName notNil ifTrue: [ (DCTRCanvasExporter canvas: v canvas) format: #png; fileName: fileName fullName; export ]. v ~~~~~~~~~~~~~~~~~~~~~~~ You could also add the export code (with minor modification) to GLMRoassal2Presentation>>defaultActions but there seems to be some kind of bug that clears the content of the playground when executed from GLM, which is a big wtf, but maybe that's just my mixed up configuration. Peter On Mon, Apr 13, 2015 at 5:17 PM, Offray Vladimir Luna Cárdenas <[hidden email]> wrote: Hi, |
Thanks Peter!
Alexandre > On Apr 13, 2015, at 1:08 PM, Peter Uhnák <[hidden email]> wrote: > > I think there is a bug in the exporter, because the canvas has a color (which is white and _not_ transparent). > Normally you can set the color of the of the canvas (view canvas color: Color purple), but the default exporter (I assume you are exporting it via GT-inspector) is ignoring it. > There is however second exporter which you can use > > ~~~~~~~~~~~~~~~~~~~~~ > |v fileName| > v := RTView new. > v canvas color: Color purple. > v addAll: (RTEllipse new color: Color black; size: 30; elementsOn: (1 to: 10)). > RTCircleLayout on: v elements. > > fileName := UITheme builder > fileSave: 'Enter the PNG file name' > extensions: #('png') > path: nil. > "fileName := '/tmp/test.png' asFileReference." > fileName notNil ifTrue: [ > (DCTRCanvasExporter canvas: v canvas) > format: #png; > fileName: fileName fullName; > export ]. > > v > ~~~~~~~~~~~~~~~~~~~~~~~ > > You could also add the export code (with minor modification) to GLMRoassal2Presentation>>defaultActions but there seems to be some kind of bug that clears the content of the playground when executed from GLM, which is a big wtf, but maybe that's just my mixed up configuration. > > Peter > > > On Mon, Apr 13, 2015 at 5:17 PM, Offray Vladimir Luna Cárdenas <[hidden email]> wrote: > Hi, > > I have finally finished the first part of my visualization project of political discourses on Twitter. You can see the details here: > > http://mutabit.com/offray/static/blog/output/posts/visualizing-politicianspolitical-discourses-on-twitter.html > > (As you can see Pharo was not used to extract the data, just to scrap it, structure it and visualize it). > > The politicians tag cloud look nice if the background is white, because the png background is transparent, but if you share it on Twitter, the black background makes the tag cloud invisible. I could use image editing programs to change the background from transparent to white, but I would like to know if there is a way to make that change inside Pharo/Roasal. > > Thanks for all your support in making this ideas possible. > > Cheers, > > Offray > > -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. |
In reply to this post by Peter Uhnak
Peter,
Thanks for your quick response and sorry for my late one. I give a try of your solution, but implemented them in my visualization process would take more time that the one I had available, so finally I went with the graphics editor solution. There is any other way I can help with debugging this? Should I open a bug report to get this solved on Roassal? Cheers, Offray El 13/04/15 a las 11:08, Peter Uhnák escribió: > I think there is a bug in the exporter, because the canvas has a color (which is > white and _not_ transparent). > Normally you can set the color of the of the canvas (view canvas color: Color > purple), but the default exporter (I assume you are exporting it via > GT-inspector) is ignoring it. > There is however second exporter which you can use > > ~~~~~~~~~~~~~~~~~~~~~ > |v fileName| > v := RTView new. > v canvas color: Color purple. > v addAll: (RTEllipse new color: Color black; size: 30; elementsOn: (1 to: 10)). > RTCircleLayout on: v elements. > > fileName := UITheme builder > fileSave: 'Enter the PNG file name' > extensions: #('png') > path: nil. > "fileName := '/tmp/test.png' asFileReference." > fileName notNil ifTrue: [ > (DCTRCanvasExporter canvas: v canvas) > format: #png; > fileName: fileName fullName; > export ]. > > v > ~~~~~~~~~~~~~~~~~~~~~~~ > > You could also add the export code (with minor modification) to > GLMRoassal2Presentation>>defaultActions but there seems to be some kind of bug > that clears the content of the playground when executed from GLM, which is a big > wtf, but maybe that's just my mixed up configuration. > > Peter > > > On Mon, Apr 13, 2015 at 5:17 PM, Offray Vladimir Luna Cárdenas > <[hidden email] <mailto:[hidden email]>> wrote: > > Hi, > > I have finally finished the first part of my visualization project of > political discourses on Twitter. You can see the details here: > > http://mutabit.com/offray/__static/blog/output/posts/__visualizing-__politicianspolitical-__discourses-on-twitter.html > <http://mutabit.com/offray/static/blog/output/posts/visualizing-politicianspolitical-discourses-on-twitter.html> > > (As you can see Pharo was not used to extract the data, just to scrap it, > structure it and visualize it). > > The politicians tag cloud look nice if the background is white, because the > png background is transparent, but if you share it on Twitter, the black > background makes the tag cloud invisible. I could use image editing programs > to change the background from transparent to white, but I would like to know > if there is a way to make that change inside Pharo/Roasal. > > Thanks for all your support in making this ideas possible. > > Cheers, > > Offray > > |
There is any other way I can help with debugging this? Should I open a bug report to get this solved on Roassal? This is best directed at Alex, but I would think that the solution should be pretty straight forward (maybe just copying part of the solution between the exporters). Alex: could you please rename DCTRCanvasExporter to TRCanvasExporter? Or whatever you fancy, but without the DC prefix. This was mentioned before by Jan but probably got lost somewhere. Peter |
Thanks for reminding me, Peter... I wrote a mail about this few months before, but it seems I made a mistake and didn't include mailing list and sent it only to (one of) Alex's personal mail address. So, I will copy paste (and rewrite a little) it here.
Hi Alex After some time I finally looked how my DCTRCanvasExporter is used in Roassal. I'm glad it found use even in Roassal itself, but there are few minor things I'd like to change anyway. I used to have mcz when I wrote that mentioned mail, but now it would make milion of conflicts so I will do new one according to your answer to this mail. First, I added few comments and made minor changes in code (however, "interface" and general behavior didn't change except of moving example method to class side). Second, it's not much of a problem, but in the class name, DCTRCanvasExporter, the "DC" letters we use to indicate it is part of our project, DynaCASE, but since it became part of whole roassal, I think the "DC" is not appropriate anymore there. And last one is more of a question than anything else... You included it into Roassal package, but it works entirely on Trachel level, wouldn't Trachel package be more appropriate? Jan
|
Hi Jan!
Sorry to replied so lately. I have renamed DCTRCanvasExporter into RTCanvasExporter. As you said, it works essentially on Trachel for now. However, I suspect this will change. You often want to particularize the export (e.g., do you want to have the menu or not?) Thanks! Cheers, Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
|
In reply to this post by Peter Uhnak
Done!
Sorry for taking so long before acting… Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
|
Free forum by Nabble | Edit this page |