Vexillology - How to construct the nutmeg in Grenada's flag? - python-imaging-library

I am working on a hobby project to construct all flags and draw them using Python Image Library, see this Codeberg project. The constructions mostly come from the website Vexilla Mundi, where they usually also have the detail drawings on flags as png files to paste onto the flag.
I am now struggling with drawing the flag for Grenada. It has a nutmeg symbol in it, but Vexilla Mundi doesn't have the drawing for it available, nor can I find it online.
Is there a place where I can find this drawing detail online?
Is there a construction sheet available such that I can draw the nutmeg symbol from scratch?
I didn't see a Vexillology community on here. If this is not the best place to ask this question, do you have other suggestions?

Related

How does one create a component which can effect things outside of runtime?

So I want to make a custom component. One of the functions I want to have is the ability to create and modify set of points that make up a circle. For example, specify point count:10, and on field update, a circle made up of 10 triangles is drawn in the editor.
Then I want to be able to drag the vertices of the created circle. I feel like I might be able to do this during runtime, but I'm curious how to do it out of runtime. For example, the built in "Box Collider" component has a button that allows you to edit the collider size in the editor.
I looked around and can't find a resource - I feel like there has to be a place for this.
Thanks.
You can execute scripts like if you were in runtime using the [ExecuteInEditMode] annotation at the begining of your class.
Check out the documentation here
For the functionality you want, you have Handles, to manipulate objects properties.
Also you'll want to develop visual aids for your tool, so you can accomplish this using Gizmos.
Google "Custom Editors for Unity" - there's a whole section of the docs for this. You have a wide array of options, from the simple to the powerful.
I recommend catlikecoding's tutorials, that are clearly than the official docs, and take you through the process step by step.
One of them almost exactly describes your situation:
http://catlikecoding.com/unity/tutorials/editor/star/

Simple form with pixel manipulation in Qt

I'm completely newbie to Qt
i want to create a 800X600 window that just show some circle and be able to manipulate pixels of the form. there is no interaction between user and form(no click, no dblclick,...) it just shows some circles with one color and lines with different pixel colors(each line may have different pixel colors)
also i want to be able to change the coordination system, i mean change it from top-left to the center of the window. could anyone help me do that with some sample code?
thanks in advance for your reply.
Please try downloading the Qt Creator (IDE), then reading through the tutorials. There's a whole host of very useful information provided for free, including a lot of the code samples you are looking for.
The following examples might also be of particular interest:
Animation Framework Examples
Graphics View Examples
Painting Examples

How does compositor work on X?

I am trying to understand how compositors work on X (well basically because neither xcompmgr nor cairo-compmgr can draw shadow properly for my awesome wm~~~)
I have read part of the source code both xcompmgr and cairo-compmgr but I still don't really understand how they do that.
I want to know how they know where the shadow should be (well, arround the window for sure, but the shadow might be under other window and don't need to be drawn.), as well as where (on which layer/window) do they draw the shadow. Probably also how all those X extension are used (and what's for) and how cairo-compmgr use cairo to deal with low level X stuff.
It's a little hard for me to learn these from the source code because a lot of stuff (especially X extensions) is poor documented. It will also be helpful just to point out where I should look at.
The simpler you code it, the best it will work.
Get a list of the visible windows
Sort them by inverse z-order (from the bottom-most to the top-most)
Draw the shadow and then the window itself for each window
You need no black magic.
If you are wondering how it works, it's straightforward: you have to use the 'composite' X extension. It enables the overlay window, which is the only visible window on the screen once it is enabled, then you have to draw all the windows on it as you will be provided with a Pixmap for each window.
EDIT:
If you are seeking for documentation, you can use the linux manual (the man command), and the header files, they're the main (also best and perhaps the only real) source of documentation, as all the other sources/websites rely on them afaik.

How to display a PDF document that includes hyperlinks? (on iOS)

The Situation: I have a pdf document that includes hyperlinks. I would like my iPhone app to display this pdf document, and enable clicking of the hyperlinks.
Note: Currently, I am trying to do this with a UIWebView, which unfortunately seems unable to detect link taps. There is a family of classes & methods called CGPDF which I have read about in the documentation. The documentation talks all about parsing pdf documents and what not but is not specific on how to detect link taps and what not (thanks apple).
I can't comment on UIWebView, but the CGPDF stuff is part of CoreGraphics. So it's primarily for drawing — you'll have a PDF object and a context to draw it to (almost certainly received via a custom subclass of UIView) and ask it to draw at a certain scale and position. If you're new to CoreGraphics and/or custom UIView subclasses then it might take a day or so to get into it, but it'll end up being a few hundred lines at worst.
CoreGraphics doesn't know anything about user interaction, so I think Apple considered it implicit that there's no concept of taps down there, and hence no way that CoreGraphics can directly help you with catching taps.
There's example code for loading a PDF and drawing it to a context at the top of this document. CoreGraphics is the same on OS X and iOS, except that the initial coordinate system is the opposite way up. On OS X it is the same way around as a PDF, on iOS it's the opposite way, so PDFs will render inverted along y if otherwise unadjusted. The section directly after the example display code is entitled 'Creating a Transform for a PDF Page' and should help with that — you just need to apply a transform that inverts y.
There's a tutorial here on how to create a custom UIView subclass that includes some CoreGraphics drawing steps.
With respect to catching taps, things get a bit more complicated. You don't need to do anything like a full PDF inspection because of the way the file format works. Things that are links are drawn to look however they should look per the normal PDF operations that CoreGraphics can handle for you. There are then separate tables that describe bounding box rectangles for catching taps and the links they should go to. Those tables are parsed into an easy to read format by CoreGraphics but not inspected. So you're given all the tools to find out where the links are without having to learn too much about the file format, but you still need to fish through for them yourself.
The relevant CoreGraphics construct is the CGPDFDictionary. You can grab the latest PDF specification here, but 99% of it isn't relevant to you or covers things that CoreGraphics already implements. You'll need to jump back and forth through the documentation to piece all the bits together, but you can leap in at section 8.4 on Annotations, on Page 488.
It ends up being a reasonably complicated combination of bits of code and I can't post my own for commercial reasons but you'll want to build up a mapping of page names to page numbers, traverse the link annotations (which are links to named pages) and do something to catch taps. Personally I just added invisible UIButtons as subviews of my custom PDF view. Obviously any transform you're applying to the PDF needs to be applied to the annotation coordinates too.
The total thing was maybe 1,000 lines.

visio stencil for Handdrawing web Mockup

Can any one suggest me a hand drawn/sketch formatted Visio stencil? i.e. One that looks like a hand drawn sketch. I have seen some Web UI wire frame done using some hand drawn tool which looks very much impressive when we can present the UI sketch to the Client rather than real hand drawn sketch.
It's will be really helpful if someone can suggest a tool rather than suggesting pencil and paper is the tool which I am using right now.
Thanks
You have pretty complete list here:
http://c2.com/cgi/wiki?GuiPrototypingTools
Try GUUUI Web Prototyping Tools. It contains stencils for sketch and minimalist shapes.