Scalable vector graphic api
Overview of the SVG properties that are implemented in my SVG lib.
The plausible roadmap
Customize a window with any design and behavior, everything is also animatable.
The icon bar
A case study of the icon bar
Gif animation workflow
Searching for a Gif animation app that can output crisp .gif animations of GUI animation examples.
StyleKit supports layered graphics. The GraphicSkin can have many layers set at many depths.
Default values in protocols
There is no support for Default values in a protocol method arguments when using swift.
My notes on creating file utils in swift
My jekyll workflow
As a programmer I sort and collect a lot of research, my problem has always been were do I store all this research?
Basic svg support
SVG support is coming along.
The jekyll setup
Jekyll I don’t want to be forced to use front-mater if its not necessary, since the title and date is already apart of the filename
Copyable instances in swift
The great thing about this approach to copying Class instances is that it doesn’t rely on NSObject or objc code, and most importantly it doesn’t clutter up the “Data-Style-Class”.
The css box model
Finally made it past the layer-backed vs layer-hosted issues. And StyleKit is working as intended.
Calayer implicit animation
CALayer and implicit animation The animation was left in intentionally for this test.
Swift regex has no conditional backref
When you want to assert if a digit is a digit i used to use a simple conditional back referencing pattern.
Graphic framework for osx
A graphics framework built on Quartz
Contemplating a name change
The hazy look and feel is a pointer to the use of translucency that OSX and IOS offer within modern UI (TranclucentSkin TM). The void like design is also a symbol that the StyleKit it self is just an empty framework.
Delegation with out strong ref
It’s possible to implement a delegation without resorting to a strong ref.
Dynamic instance creation
NOTE: it does require that each class extends the same protocol and that they have similar init method
Calayer and context
It seems you can only get the context of a calayer only within the drawInContext method or the displayLayer method. The downside of this is that you have to either use the CALAyer delegate
Since there is little information about this class on the internet I thought id write a small notice.
The odd case of luck
I was just testing the Graphic.swift class to implement the “new” css box model when all of a sudden the “old” css box model started to work in a layer-backed view. What was different from before was that the Graphic class did the quartz drawing inside the drawInContext and not in the drawRect as i was testing in Playground.
The layer backed approach
What if Skin extended CALayer, and each decoratable also was a CALayer. As skin has no benefit of being an NSView, except for the TextSkin.
Good news everyone
Turns out that in the original concept of Element, the borders aren’t drawn outside the frame of the Element. Its drawn inside, and then the fill is offset in order to support this.
NSView & CALayer combo vs Root NSView w/ CALayer
Overlapping tracking areas
Solution (for the mouseOver / mouseOut problem)
Conclusion CALayers are great, but they dont have any interaction support, you have to do all interaction tasks in a root NSView. One option is to create and attach a custom nsView to all windows.
Animation in quartz
Core Animation has rich support for controlling the timing of animations through the CAMediaTiming protocol,
Overlapping views in osx
Research indicates that to solve the overlapping sibling View problem in OSX one needs to look into:
Introducing the TabBar made with Element:
Equality between protocols
Drop this in playground and your on your way:
Nsbezierpath vs cgpath
Seems simpler than its CGPath brethren, however I currently have the impression that CGPath has more support in quartz.
Extracting rgba values from nscolor
Extracting RGBA values from NSColor
**Casting Array to Array**
This is a great way to add context to “data container classes” as it is then easy to debug all the variables in the instance
Textbutton with margin
The text in the TextButton now supports margin (Its also possible to use percentage and EMS for dynamic vertical centering that follows the size of the font and the element height)
Protocols and variable naming
The solution to the problem bellow is to name your variables differently than your implicit setter
A great alternative to subclassing
This is a great way to add functionality to existing classes and new classes by having a common extension to a common protocol.
Protocol support for inout
When you cast a class to a protocol you end up with an immutable reference, which cant be used in inout function parameters. So you can
When you call needsDisplay = true, every NSView that has been added gets called from The first added to the last. The implications of this is that you shouldn’t put heavy calculations within the drawRect closures.
Testing some states with some different styles
Hand cursor on hover
Drop this code into any subclass of NSView, to enable the hand cursor
Button mouse states
Current state support: up,over,down