linton@marktwain.rad.sgi.com (Mark Linton) (04/15/91)
In article <9104121357.AA03653@control.lth.se>, dag@CONTROL.LTH.SE (Dag Bruck) writes: |> Environment: InterViews 2.6 with patches, Sun-4, SunOS 4.1.1, Cfront 2.1. |> |> I create bitmap objects using the constructor |> |> Bitmap(const char* filename); |> |> However, if the given filename doesn't refer to a valid bitmap file, |> I get some strange X protocol error later on. |> |> QUESTION: How do I check that the created Bitmap object really refers |> to a valid bitmap? This is a bug. 3.0 no longer has that constructor, but instead has a static member function "open" that returns a Bitmap* if the file is found or nil otherwise.
Tom.Emerson@UVM.EDU (Tom Emerson) (04/16/91)
>>>>> On Fri, 12 Apr 91 15:57:09 +0200, Dag Bruck <dag@control.lth.se> said:
Dag> Environment: InterViews 2.6 with patches, Sun-4, SunOS 4.1.1,
Dag> Cfront 2.1.
Dag> I create bitmap objects using the constructor
Dag> Bitmap(const char* filename);
Dag> However, if the given filename doesn't refer to a valid bitmap file,
Dag> I get some strange X protocol error later on.
Dag> QUESTION: How do I check that the created Bitmap object really refers
Dag> to a valid bitmap?
The way I do it is to #include the bitmap sources and then use the
bitmap(void* data, int width, int height, int x0, int y0) with the
information supplied with the bitmap.
Thomas
--
Thomas Emerson
________________ Student Systems Programmer - EMBA Computer Facility
/ /_) /_ /_ University of Vermont
/ / \ /__ /__ tree@newton.uvm.edu
"It's a pity the universe doesn't use segmented architecture
with a protected mode." --- Rick Cook