Class SmoothingRenderer


  • public class SmoothingRenderer
    extends java.lang.Object
    Renderer for smoothed faces as used by Crossfire.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void paintSmooth​(@NotNull java.awt.Graphics graphics, @NotNull java.awt.Point pos, int level, int firstLayer, boolean allLayers, int borderOffsetX, int borderOffsetY)
      Draw the smoothing information at given position of map, for a given limit smoothlevel, at a given layer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SmoothingRenderer

        protected SmoothingRenderer​(@NotNull
                                    @NotNull MapModel<GameObject,​MapArchObject,​Archetype> mapModel,
                                    @NotNull
                                    @NotNull SmoothFaces smoothFaces,
                                    @NotNull
                                    @NotNull FaceObjectProviders faceObjectProviders)
        Creates a new instance.
        Parameters:
        mapModel - the map model to render
        smoothFaces - the smooth faces to use
        faceObjectProviders - the face object providers for looking up faces
    • Method Detail

      • paintSmooth

        public void paintSmooth​(@NotNull
                                @NotNull java.awt.Graphics graphics,
                                @NotNull
                                @NotNull java.awt.Point pos,
                                int level,
                                int firstLayer,
                                boolean allLayers,
                                int borderOffsetX,
                                int borderOffsetY)
        Draw the smoothing information at given position of map, for a given limit smoothlevel, at a given layer. This operation may be recursive, if all layer above current are to be drawn too.
        Parameters:
        graphics - where to draw (graphics)
        pos - the coordinate of the map square to draw, in map coordinates
        level - the limit smoothlevel (smooth levels above this are drawn)
        firstLayer - the layer (map z coordinate) to draw; note that invisible objects are supposed to not use a layer, to stay coherent with client behavior
        allLayers - whether or not to draw also layers above current one
        borderOffsetX - the border x offset
        borderOffsetY - the border y offset