##- # Author: Brian Tiffin # Dedicated to the public domain # # Date started: January 2017 # Modified: 2017-01-09/03:50-0500 ##+ # # WAttrib, demonstrate window attribute control # procedure main() w := open("WAttrib", "g", "size=40,40", "canvas=hidden") write("Default Attributes (given size=40,40)") write("-------------------------------------") alist := ["fg", "bg", "size", "pos", "canvas", "windowlabel", "inputmask", "pointer", "pointerx", "pointery", "display", "depth", "displaywidth", "displayheight", "font", "fheight", "fwidth", "leading", "ascent", "descent", "drawop", "fillstyle", "pattern", "linestyle", "linewidth", "clipx", "clipy", "clipw", "cliph", "dx", "dy"] every a := !sort(alist) do write(left(a, 16), ": ", WAttrib(w, a)) WAttrib(w, "fg=vivid orange") DrawCircle(w, 20, 20, 18) WFlush(w) # change the display offsets along with colour WAttrib(w, "dx=5", "dy=5", "fg=blue") DrawCircle(w, 20, 20, 9, 0.0, &pi) WSync(w) # save image for the document WriteImage(w, "../images/WAttrib.png") close(w) end