-- GraphicsImportImpl.mesa -- Last edited by Doug Wyatt, August 30, 1982 5:32 pm -- Compile this module and bind it together with the GraphicsPackage to -- verify that GraphicsPackage exports everything that this module imports. -- This module is not intended to be executed. DIRECTORY Graphics, GraphicsOps, GraphicsColor, CGBitmapDeviceExtras, File, Rope; GraphicsImportImpl: CEDAR PROGRAM IMPORTS Graphics, GraphicsOps, GraphicsColor, CGBitmapDeviceExtras = { Test: PROC = { context, other: Graphics.Context; path: Graphics.Path; image: Graphics.ImageRef; font: Graphics.FontRef; rope: Rope.ROPE _ "foo"; text: REF READONLY TEXT _ "foo"; string: STRING _ "foo"; mark: Graphics.Mark; bitmap: GraphicsOps.BitmapRef; file: File.Capability; proc: PROC[PROC[CHAR] RETURNS[BOOL]] = { }; mapper: GraphicsOps.MapperRef; clipper: GraphicsOps.ClipperRef; color: GraphicsColor.Color; context _ Graphics.NewContext[]; other _ Graphics.CopyContext[context]; [] _ context.GetCP[]; context.SetCP[0,0]; path _ Graphics.NewPath[]; [] _ Graphics.LastPoint[path]; Graphics.FlushPath[path]; Graphics.MoveTo[path, 0,0]; Graphics.LineTo[path, 0,0]; Graphics.CurveTo[path, 0,0,0,0,0,0]; Graphics.Rectangle[path, 0,0,0,0]; context.DrawTo[0,0]; context.DrawStroke[path]; context.DrawArea[path]; context.DrawBox[[0,0,0,0]]; image _ GraphicsOps.NewAisImage[rope]; context.DrawImage[image]; context.Translate[0,0]; context.Scale[0,0]; context.Rotate[0]; context.Concat[0,0,0,0]; [] _ context.Map[other, 0,0]; [] _ context.WorldToUser[0,0]; [] _ context.UserToWorld[0,0]; context.SetColor[Graphics.black]; [] _ context.GetColor[]; context.SetStipple[0]; [] _ context.SetPaintMode[opaque]; [] _ context.SetFat[TRUE]; font _ Graphics.MakeFont[rope]; [] _ context.GetDefaultFont[]; context.SetDefaultFont[font]; context.DrawRope[rope]; context.DrawChar['x]; [] _ Graphics.RopeBox[font, rope]; [] _ Graphics.RopeWidth[font, rope]; [] _ Graphics.CharBox[font, 'x]; [] _ Graphics.CharWidth[font, 'x]; [] _ Graphics.FontBox[font]; context.ClipArea[path]; context.ClipBox[[0,0,0,0]]; [] _ context.IsPointVisible[0,0]; [] _ context.IsRectangular[]; [] _ context.GetBounds[]; [] _ context.Visible[]; mark _ context.Save[]; context.Restore[mark]; bitmap _ GraphicsOps.NewBitmap[0,0]; [] _ GraphicsOps.NewContextFromBitmap[bitmap]; GraphicsOps.SetTargetBitmap[context, bitmap]; TRUSTED { GraphicsOps.DrawBitmap[context, bitmap, 0, 0] }; [] _ GraphicsOps.ScreenBitmap[]; image _ GraphicsOps.NewAisImageFromCapability[file]; [] _ GraphicsOps.ImageBox[image]; font _ GraphicsOps.DefaultFont[]; GraphicsOps.DrawTextFromProc[context, proc]; GraphicsOps.DrawText[context, text]; [] _ GraphicsOps.TextBox[font, text]; [] _ GraphicsOps.TextWidth[font, text]; [] _ GraphicsOps.UserToDevice[context, 0,0]; [] _ GraphicsOps.DeviceToUser[context, 0,0]; mapper _ GraphicsOps.GetMapper[context]; GraphicsOps.SetMapper[context, mapper]; clipper _ GraphicsOps.GetClipper[context]; GraphicsOps.SetClipper[context, clipper]; [] _ GraphicsOps.TestVisible[mapper,clipper,0,0]; [] _ GraphicsOps.TestBounds[mapper,clipper]; GraphicsOps.BeginBox[context]; [] _ GraphicsOps.EndBox[context]; [] _ GraphicsOps.GetYMode[context]; GraphicsOps.SetYMode[context, bottomUp]; GraphicsOps.DrawTexturedBox[context, [0,0,0,0],ALL[0]]; GraphicsOps.Disable[context]; GraphicsOps.MoveDeviceRectangle[context, 0, 0, 0, 0, 0, 0]; TRUSTED {font _ GraphicsOps.UnsafeNewFont[NIL]}; color _ GraphicsColor.IntensityToColor[0]; color _ GraphicsColor.HSVToColor[0,0,0]; color _ GraphicsColor.RGBToColor[0,0,0]; [] _ GraphicsColor.ColorToRGB[color]; [] _ GraphicsColor.ColorToHSV[color]; [] _ GraphicsColor.ColorToIntensity[color]; CGBitmapDeviceExtras.SetBrick[0,0,0,NIL]; CGBitmapDeviceExtras.ResetBrick[]; CGBitmapDeviceExtras.SetMap[NIL]; }; }. Κœ– "Mesa" style˜Iprocš0ΟcQœΓœΟk œ`ž œžœCΟnœžœƒžœžœžœžœžœcžœžœžœžœžœΞžœΊžœ΄žœfžœ#žœ­žœFžœ ˜†—…—ˆ*