Hi,
somebody pointed me to this blog entry[1] about a VisualWorks binding for Cairo Graphics. Unfortunately I've got problems with getting started. This is what I did: 1. Loaded latest version (aka 18) of package CairoGraphics from the Cincom public store. 2. Evaluated the follwing code in a workspace: "surface := ImageSurface format: #alphaColor extent: 200 @ 300." This is the error messsage I get: "Unhandled exception: Could not load library". Any help welcome :-) Cheers, michael [1] http://www.cincomsmalltalk.com/userblogs/travis/blogView?showComments=true&entry=3330699016 |
You must have libcairo.so visible to the VM, see class LibCairo for details,
... #libraryFiles #('libcairo.so') ... Hope this helps, -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -----Original Message----- From: Michael Meyer [mailto:[hidden email]] Sent: Friday, August 18, 2006 9:42 AM To: [hidden email] Subject: Getting started with CairoGraphics? Hi, somebody pointed me to this blog entry[1] about a VisualWorks binding for Cairo Graphics. Unfortunately I've got problems with getting started. This is what I did: 1. Loaded latest version (aka 18) of package CairoGraphics from the Cincom public store. 2. Evaluated the follwing code in a workspace: "surface := ImageSurface format: #alphaColor extent: 200 @ 300." This is the error messsage I get: "Unhandled exception: Could not load library". Any help welcome :-) Cheers, michael [1] http://www.cincomsmalltalk.com/userblogs/travis/blogView?showComments=true&e ntry=3330699016 smime.p7s (4K) Download Attachment |
In reply to this post by Michael Meyer-6
On Aug 18, 2006, at 9:41, Michael Meyer wrote:
What OS are you running on? I've not done the "cross platform thing for the libraries yet", it always takes me a while to get my head around that. This stuff is still evolving, but I'd love to have you play with it and give feedback. Boris and I plan on merging the efforts between CairoGraphics and Chartz. In the example above, that interface is changing to use a class shares for the constants, though I don't think I've replicated that yet. Suffice it to say, sometime soon it will read: surface := ImageSurface format: FormatAlphaColor extent: 200@300. -- Travis Griggs Objologist "Every institution finally perishes by an excess of its own first principle." - Lord Acton DISCLAIMER: This email is bound by the terms and conditions described at http://www.key.net/disclaimer.htm |
Hi,
finally found out where to put the dll file. I endlessly tried putting it in the \dllcc\nt folder. But that didn't work. Now I found out that it is enough to just but the dll in the same folder as the image. @travis I'm working on WindowsXp with vw7.4 and I'm using version 1.2.2 of the libcairo.dll (Version 1.2.0 wouldn't load). When I now try to evaluate "surface := ImageSurface format: #alphaColor extent: 200@300" I get the stack trace that I've attached to the end of this mail michael Unhandled exception: Message not understood: #withLastRites: CairoGraphics.ImageSurface(Object)>>doesNotUnderstand: CairoGraphics.ImageSurface class(CairoGraphics.ManagedHandle class)>>noteHandleOf: CairoGraphics.ImageSurface(CairoGraphics.ManagedHandle)>>handleValue: CairoGraphics.ImageSurface>>initFormat:width:height: CairoGraphics.ImageSurface class>>format:width:height: CairoGraphics.ImageSurface class>>format:extent: UndefinedObject>>unboundMethod UndefinedObject(Object)>>performMethod:arguments: UndefinedObject(Object)>>performMethod: TextEditorController(ParagraphEditor)>>evaluateCompiled: optimized [] in ParagraphEditor>>evaluateSelection BlockClosure>>ensure: Cursor>>showWhile: TextEditorController(ParagraphEditor)>>evaluateSelection optimized [] in ParagraphEditor>>inspectIt BlockClosure>>on:do: TextEditorController(ParagraphEditor)>>inspectIt WorkspacePage>>inspectIt Workbook(AbstractWorkspace)>>smalltalkInspectIt WinXPMenuBarButtonController(MenuBarButtonController)>>dispatchMenuSymbol: WinXPMenuBarButtonController(MenuBarButtonController)>>dispatchMenuSelection: optimized [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor: BlockClosure>>ensure: WinXPMenuBarButtonView(MenuBarButtonView)>>processShortcutKeyEventAsMenuItemAccessor: [] in WinXPMenuBar(MenuBar)>>processShortcutKeyEventInMenuBar: OrderedCollection>>do: WinXPMenuBar(MenuBar)>>processShortcutKeyEventInMenuBar: KeyboardProcessor>>processShortcutKeyEvent: KeyboardProcessor>>processKeyboardEvent: KeyboardProcessor>>processKeyboardEvent:for: EventDispatcher>>dispatchEvent: KeyPressedEvent(Event)>>dispatch KeyPressedEvent(Event)>>dispatchForWindowManager: optimized [] in WindowManager>>safelyDispatchForWindowManager: BlockClosure>>on:do: WindowManager>>safelyDispatchForWindowManager: WindowManager>>processNextEvent optimized [] in [] in WindowManager>>newProcess BlockClosure>>on:do: optimized [] in WindowManager>>newProcess BlockClosure>>on:do: optimized [] in Process class>>forBlock:priority: ---------------------------------------------------------------------- CairoGraphics.ImageSurface(Object)>>doesNotUnderstand: Receiver: an CairoGraphics.ImageSurface Instance Variables: library = a CairoGraphics.LibCairo handle = 18529960 errorCode = nil Arguments: aMessage = a Message with selector: #withLastRites: and arguments: #(BlockClosure [] in CairoGraphics.ManagedHandle class>>noteHandleOf:) Temporaries: excpt = a MessageNotUnderstood resumeValue = nil Context PC = 25 ---------------------------------------------------------------------- CairoGraphics.ImageSurface class(CairoGraphics.ManagedHandle class)>>noteHandleOf: Receiver: an CairoGraphics.ImageSurface class Instance Variables: superclass = CairoGraphics.Surface methodDict = a MethodDictionary[8] format = 16387 subclasses = nil instanceVariables = nil organization = ('initialize-release' #formatCode: #initFormat:width:height: #initFormat:width:height:usingBits:stride: #initPngPath:) ('accessing' #extent #height #width) ('converting' #asPattern) name = #ImageSurface classPool = a NameSpaceOfClass[0] environment = a NameSpace[21] Arguments: anObject = a CairoGraphics.ImageSurface Context PC = 12 ---------------------------------------------------------------------- CairoGraphics.ImageSurface(CairoGraphics.ManagedHandle)>>handleValue: Receiver: an CairoGraphics.ImageSurface Instance Variables: library = a CairoGraphics.LibCairo handle = 18529960 errorCode = nil Arguments: aBlock = BlockClosure [] in CairoGraphics.ImageSurface>>initFormat:width:height: Context PC = 9 ---------------------------------------------------------------------- CairoGraphics.ImageSurface>>initFormat:width:height: Receiver: an CairoGraphics.ImageSurface Instance Variables: library = a CairoGraphics.LibCairo handle = 18529960 errorCode = nil Arguments: aFormat = #alphaColor aWidth = 200 aHeight = 300 Context PC = 11 ---------------------------------------------------------------------- CairoGraphics.ImageSurface class>>format:width:height: Receiver: an CairoGraphics.ImageSurface class Instance Variables: superclass = CairoGraphics.Surface methodDict = a MethodDictionary[8] format = 16387 subclasses = nil instanceVariables = nil organization = ('initialize-release' #formatCode: #initFormat:width:height: #initFormat:width:height:usingBits:stride: #initPngPath:) ('accessing' #extent #height #width) ('converting' #asPattern) name = #ImageSurface classPool = a NameSpaceOfClass[0] environment = a NameSpace[21] Arguments: aFormatSymbol = #alphaColor aWidth = 200 aHeight = 300 Context PC = 9 ---------------------------------------------------------------------- CairoGraphics.ImageSurface class>>format:extent: Receiver: an CairoGraphics.ImageSurface class Instance Variables: superclass = CairoGraphics.Surface methodDict = a MethodDictionary[8] format = 16387 subclasses = nil instanceVariables = nil organization = ('initialize-release' #formatCode: #initFormat:width:height: #initFormat:width:height:usingBits:stride: #initPngPath:) ('accessing' #extent #height #width) ('converting' #asPattern) name = #ImageSurface classPool = a NameSpaceOfClass[0] environment = a NameSpace[21] Arguments: aFormatSymbol = #alphaColor aPoint = 200@300 Context PC = 11 ---------------------------------------------------------------------- UndefinedObject>>unboundMethod Receiver: an UndefinedObject Context PC = 12 ---------------------------------------------------------------------- UndefinedObject(Object)>>performMethod:arguments: Receiver: an UndefinedObject Arguments: method = AnnotatedMethod UndefinedObject>>unboundMethod args = an Array[0] Context PC = 5 ---------------------------------------------------------------------- UndefinedObject(Object)>>performMethod: Receiver: an UndefinedObject Arguments: method = AnnotatedMethod UndefinedObject>>unboundMethod Context PC = 5 ---------------------------------------------------------------------- TextEditorController(ParagraphEditor)>>evaluateCompiled: Receiver: a TextEditorController Instance Variables: model = a PluggableAdaptor view = a TextEditorView sensor = a TranslatingSensor menuHolder = a ValueHolder on: a Menu performer = a WorkspacePage beginTypeInIndex = nil anchorIndex = 1 emphasisHere = nil dispatchTable = a DispatchTable charComposer = a CharacterComposer textHasChanged = true feelPolicy = a Win95FeelPolicy supportCodeEditingFeels = true localMenuItems = an Array[20] extendingDown = true keyboardProcessor = a KeyboardProcessor keyboardHook = nil readOnly = false accepted = false autoAccept = false continuousAccept = false tabMeansNextField = true tabRequiresControl = true dispatcher = an UIDispatcher Arguments: aMethod = AnnotatedMethod UndefinedObject>>unboundMethod Temporaries: context = nil Context PC = 13 ---------------------------------------------------------------------- optimized [] in ParagraphEditor>>evaluateSelection Receiver: an UndefinedObject Temporaries: .self = a TextEditorController .code = AnnotatedMethod UndefinedObject>>unboundMethod Context PC = 7 ---------------------------------------------------------------------- BlockClosure>>ensure: Receiver: a BlockClosure Instance Variables: method = CompiledBlock [] in ParagraphEditor>>evaluateSelection outerContext = nil copiedValues = an Array[2] Arguments: aBlock = BlockClosure [] in Cursor>>showWhile: Temporaries: result = nil Context PC = 4 ---------------------------------------------------------------------- Cursor>>showWhile: Receiver: a Cursor Instance Variables: errorCode = 0 handle = 4 image = Depth1Image(extent: 16@16 depth: 1) mask = Depth1Image(extent: 16@16 depth: 1) hotSpot = 1@1 name = 'xeq' Arguments: aBlock = BlockClosure [] in ParagraphEditor>>evaluateSelection Temporaries: oldcursor = Cursor normal Context PC = 23 ---------------------------------------------------------------------- TextEditorController(ParagraphEditor)>>evaluateSelection Receiver: a TextEditorController Instance Variables: model = a PluggableAdaptor view = a TextEditorView sensor = a TranslatingSensor menuHolder = a ValueHolder on: a Menu performer = a WorkspacePage beginTypeInIndex = nil anchorIndex = 1 emphasisHere = nil dispatchTable = a DispatchTable charComposer = a CharacterComposer textHasChanged = true feelPolicy = a Win95FeelPolicy supportCodeEditingFeels = true localMenuItems = an Array[20] extendingDown = true keyboardProcessor = a KeyboardProcessor keyboardHook = nil readOnly = false accepted = false autoAccept = false continuousAccept = false tabMeansNextField = true tabRequiresControl = true dispatcher = an UIDispatcher Temporaries: code = AnnotatedMethod UndefinedObject>>unboundMethod result = nil Context PC = 14 ---------------------------------------------------------------------- optimized [] in ParagraphEditor>>inspectIt Receiver: an UndefinedObject Temporaries: .self = a TextEditorController Context PC = 6 ---------------------------------------------------------------------- BlockClosure>>on:do: Receiver: a BlockClosure Instance Variables: method = CompiledBlock [] in ParagraphEditor>>inspectIt outerContext = nil copiedValues = a TextEditorController Arguments: anExceptionSelector = CompilationError handlerBlock = BlockClosure [] in ParagraphEditor>>inspectIt Context PC = 18 ---------------------------------------------------------------------- TextEditorController(ParagraphEditor)>>inspectIt Receiver: a TextEditorController Instance Variables: model = a PluggableAdaptor view = a TextEditorView sensor = a TranslatingSensor menuHolder = a ValueHolder on: a Menu performer = a WorkspacePage beginTypeInIndex = nil anchorIndex = 1 emphasisHere = nil dispatchTable = a DispatchTable charComposer = a CharacterComposer textHasChanged = true feelPolicy = a Win95FeelPolicy supportCodeEditingFeels = true localMenuItems = an Array[20] extendingDown = true keyboardProcessor = a KeyboardProcessor keyboardHook = nil readOnly = false accepted = false autoAccept = false continuousAccept = false tabMeansNextField = true tabRequiresControl = true dispatcher = an UIDispatcher Context PC = 20 ---------------------------------------------------------------------- WorkspacePage>>inspectIt Receiver: a WorkspacePage Instance Variables: dependents = a PluggableAdaptor builder = an UIBuilder uiSession = nil eventHandlers = an IdentityDictionary[1] workspace = a Workbook label = an UserMessage('Page 1', #Page1, #dialogs) verboseLabel = nil filename = nil fileTimestamp = nil textModel = a PluggableAdaptor unacceptedText = nil savedSelection = nil savedFileTimestamp = nil textModelOverride = nil Context PC = 5 ---------------------------------------------------------------------- Workbook(AbstractWorkspace)>>smalltalkInspectIt Receiver: a Workbook Instance Variables: dependents = an ApplicationWindow 2143 builder = an UIBuilder uiSession = a ControlManager eventHandlers = nil locals = a WorkspaceVariablePool[1] importAll = true specificImports = an Array[3] importSummaryHolder = a ValueHolder on: 'All' pageExplanationHolder = a ValueHolder on: 'Text or Smalltalk code' statusBarVisible = true encodingChannel = a ValueHolder on: #Source menuBarHolder = a ValueHolder on: a Menu pageHolder = a SelectionInList lastInstalledPage = a WorkspacePage Context PC = 5 ---------------------------------------------------------------------- WinXPMenuBarButtonController(MenuBarButtonController)>>dispatchMenuSymbol: Receiver: a WinXPMenuBarButtonController Instance Variables: model = nil view = a WinXPMenuBarButtonView sensor = a TranslatingSensor highlightOnOpen = false Arguments: menuSelection = #smalltalkInspectIt Context PC = 38 ---------------------------------------------------------------------- WinXPMenuBarButtonController(MenuBarButtonController)>>dispatchMenuSelection: Receiver: a WinXPMenuBarButtonController Instance Variables: model = nil view = a WinXPMenuBarButtonView sensor = a TranslatingSensor highlightOnOpen = false Arguments: menuSelection = #smalltalkInspectIt Context PC = 21 ---------------------------------------------------------------------- optimized [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor: Receiver: an UndefinedObject Temporaries: .self = a WinXPMenuBarButtonView .theValue = #smalltalkInspectIt Context PC = 12 ---------------------------------------------------------------------- BlockClosure>>ensure: Receiver: a BlockClosure Instance Variables: method = CompiledBlock [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor: outerContext = nil copiedValues = an Array[2] Arguments: aBlock = BlockClosure [] in MenuBarButtonView>>processShortcutKeyEventAsMenuItemAccessor: Temporaries: result = nil Context PC = 4 ---------------------------------------------------------------------- WinXPMenuBarButtonView(MenuBarButtonView)>>processShortcutKeyEventAsMenuItemAccessor: Receiver: a WinXPMenuBarButtonView Instance Variables: container = a BoundedWrapper on: a WinXPMenuBarButtonView eventHandlers = nil model = nil controller = a WinXPMenuBarButtonController properties = nil state = a WidgetState isInTransition = true latestValue = nil referenceValue = true label = Label for 'Smalltalk' textStyle = a VariableSizeTextAttributes helpText = nil menuHolder = a Menu menuBar = a WinXPMenuBar accessChar = 1 flyingOver = false Arguments: aKeyboardEvent = a KeyPressedEvent Temporaries: theMenu = a Menu matchingMenuItem = a MenuItem 'Inspect it' theValue = #smalltalkInspectIt selector = nil Context PC = 56 ---------------------------------------------------------------------- [] in WinXPMenuBar(MenuBar)>>processShortcutKeyEventInMenuBar: Receiver: a WinXPMenuBar Instance Variables: container = a MenuBarWrapper on: a WinXPMenuBar eventHandlers = nil components = an OrderedCollection[5] preferredBounds = 0@0 corner: 201@20 leftSpace = 0 spaceBetweenItems = 0 extraSpaceTop = 0 extraSpaceBottom = 0 extraSpaceBetweenLines = 0 menuChannel = a ValueHolder on: a Menu performer = a Workbook menuButtons = an OrderedCollection[5] nextMenuButton = nil lastMousePosition = 477@316 Arguments: each = a WinXPMenuBarButtonView Temporaries: .aKeyboardEvent = a KeyPressedEvent Context PC = 10 ---------------------------------------------------------------------- OrderedCollection>>do: Receiver: an OrderedCollection Instance Variables: firstIndex = 1 lastIndex = 5 Arguments: aBlock = BlockClosure [] in MenuBar>>processShortcutKeyEventInMenuBar: Temporaries: index = 3 Context PC = 17 ---------------------------------------------------------------------- WinXPMenuBar(MenuBar)>>processShortcutKeyEventInMenuBar: Receiver: a WinXPMenuBar Instance Variables: container = a MenuBarWrapper on: a WinXPMenuBar eventHandlers = nil components = an OrderedCollection[5] preferredBounds = 0@0 corner: 201@20 leftSpace = 0 spaceBetweenItems = 0 extraSpaceTop = 0 extraSpaceBottom = 0 extraSpaceBetweenLines = 0 menuChannel = a ValueHolder on: a Menu performer = a Workbook menuButtons = an OrderedCollection[5] nextMenuButton = nil lastMousePosition = 477@316 Arguments: aKeyboardEvent = a KeyPressedEvent Context PC = 20 ---------------------------------------------------------------------- KeyboardProcessor>>processShortcutKeyEvent: Receiver: a KeyboardProcessor Instance Variables: keyboardConsumers = an OrderedCollection[2] currentConsumer = a TextEditorController default = nil cancel = nil keyboardHook = nil focusIsShifting = false currentConsumerChannel = nil acceptOnControlChange = false menuBar = a WinXPMenuBar Arguments: aKeyEvent = a KeyPressedEvent Temporaries: theCurrentConsumer = a TextEditorController index = nil controller = nil Context PC = 28 ---------------------------------------------------------------------- KeyboardProcessor>>processKeyboardEvent: Receiver: a KeyboardProcessor Instance Variables: keyboardConsumers = an OrderedCollection[2] currentConsumer = a TextEditorController default = nil cancel = nil keyboardHook = nil focusIsShifting = false currentConsumerChannel = nil acceptOnControlChange = false menuBar = a WinXPMenuBar Arguments: aKeyboardEvent = a KeyPressedEvent Temporaries: theCurrentConsumer = nil Context PC = 8 ---------------------------------------------------------------------- KeyboardProcessor>>processKeyboardEvent:for: Receiver: a KeyboardProcessor Instance Variables: keyboardConsumers = an OrderedCollection[2] currentConsumer = a TextEditorController default = nil cancel = nil keyboardHook = nil focusIsShifting = false currentConsumerChannel = nil acceptOnControlChange = false menuBar = a WinXPMenuBar Arguments: keyboardEvent = a KeyPressedEvent aController = an ApplicationStandardSystemController Temporaries: ev = a KeyPressedEvent Context PC = 26 ---------------------------------------------------------------------- EventDispatcher>>dispatchEvent: Receiver: an EventDispatcher Instance Variables: windowController = an ApplicationStandardSystemController currentMouseConsumer = nil grabbingMouse = false keyboardProcessor = a KeyboardProcessor lastControlObject = a TextEditorController trapList = nil state = nil repairDamageWhenDebugging = true flushQueueAfterError = true distributeEventsWhenDebugging = true dragDropInProgress = false dragDropTracker = nil dispatchUnknownEvents = false Arguments: event = a KeyPressedEvent Temporaries: objectWantingControl = nil targetKeyboardProcessor = a KeyboardProcessor Context PC = 82 ---------------------------------------------------------------------- KeyPressedEvent(Event)>>dispatch Receiver: a KeyPressedEvent Instance Variables: time = nil initiator = an EventDispatcher window = an ApplicationWindow 2143 state = nil keyCharacter = $ "16r0011" metaState = 2 alternativeKeyCharacter = nil Context PC = 16 ---------------------------------------------------------------------- KeyPressedEvent(Event)>>dispatchForWindowManager: Receiver: a KeyPressedEvent Instance Variables: time = nil initiator = an EventDispatcher window = an ApplicationWindow 2143 state = nil keyCharacter = $ "16r0011" metaState = 2 alternativeKeyCharacter = nil Arguments: aWinMgr = a WindowManager Context PC = 4 ---------------------------------------------------------------------- optimized [] in WindowManager>>safelyDispatchForWindowManager: Receiver: an UndefinedObject Temporaries: .event = a KeyPressedEvent .self = a WindowManager Context PC = 6 ---------------------------------------------------------------------- BlockClosure>>on:do: Receiver: a BlockClosure Instance Variables: method = CompiledBlock [] in WindowManager>>safelyDispatchForWindowManager: outerContext = nil copiedValues = an Array[2] Arguments: anExceptionSelector = BadControllerError handlerBlock = BlockClosure [] in WindowManager>>safelyDispatchForWindowManager: Context PC = 18 ---------------------------------------------------------------------- WindowManager>>safelyDispatchForWindowManager: Receiver: a WindowManager Instance Variables: windows = an OrderedCollection[1] activeController = nil interruptLock = false outstandingMetaOrDamage = false openInProgress = false eventQueue = an EventQueue baseProcess = a Process in Semaphore>>wait dontFilterEvents = false Arguments: event = a KeyPressedEvent Context PC = 13 ---------------------------------------------------------------------- WindowManager>>processNextEvent Receiver: a WindowManager Instance Variables: windows = an OrderedCollection[1] activeController = nil interruptLock = false outstandingMetaOrDamage = false openInProgress = false eventQueue = an EventQueue baseProcess = a Process in Semaphore>>wait dontFilterEvents = false Temporaries: event = a KeyPressedEvent Context PC = 9 ---------------------------------------------------------------------- optimized [] in [] in WindowManager>>newProcess Receiver: an UndefinedObject Temporaries: .self = a WindowManager Context PC = 13 ---------------------------------------------------------------------- BlockClosure>>on:do: Receiver: a BlockClosure Instance Variables: method = CompiledBlock [] in [] in WindowManager>>newProcess outerContext = nil copiedValues = a WindowManager Arguments: anExceptionSelector = TerminateException handlerBlock = BlockClosure [] in [] in WindowManager>>newProcess Context PC = 18 ---------------------------------------------------------------------- optimized [] in WindowManager>>newProcess Receiver: an UndefinedObject Temporaries: .self = a WindowManager Context PC = 15 ---------------------------------------------------------------------- BlockClosure>>on:do: Receiver: a BlockClosure Instance Variables: method = CompiledBlock [] in WindowManager>>newProcess outerContext = nil copiedValues = a WindowManager Arguments: anExceptionSelector = TerminateException handlerBlock = BlockClosure [] in [] in Process class>>forBlock:priority: Context PC = 18 ---------------------------------------------------------------------- optimized [] in Process class>>forBlock:priority: Receiver: an UndefinedObject Temporaries: .aBlock = BlockClosure [] in WindowManager>>newProcess Context PC = 9 |
In reply to this post by Travis Griggs
Hi Travis,
in the package comment of CairoGraphics you mention that you are also planing to support the X11 and Windows surfaces. I don't think I have to mention how very, very cool that would be :-) Can you give a (very) rough estimate on when these surfaces could be available? Cheers, michael |
Free forum by Nabble | Edit this page |