Platforms to show: All Mac Windows Linux Cross-Platform

CDAngularMeterMBS class

Super class: CDBaseMeterMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class ChartDirector MBS ChartDirector Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The AngularMeter class represents angular meters.
Example
// The value to display on the meter
const value = 27.48

// Create an AngularMeter object of size 200 x 115 pixels, with silver background
// color, black border, 2 pixel 3D border border and rounded corners
dim m as new CDAngularMeterMBS(200, 115, CDBaseChartMBS.silverColor, &h000000, 2)
m.setRoundedFrame

// Set the meter center at (100, 100), with radius 85 pixels, and span from -90
// to +90 degress (semi-circle)
m.setMeter(100, 100, 85, -90, 90)

// Meter scale is 0 - 100, with major tick every 20 units, minor tick every 10
// units, and micro tick every 5 units
m.setScale(0, 100, 20, 10, 5)

// Set 0 - 60 as green (66FF66) zone
m.addZone(0, 60, 0, 85, &h66ff66)

// Set 60 - 80 as yellow (FFFF33) zone
m.addZone(60, 80, 0, 85, &hffff33)

// Set 80 - 100 as red (FF6666) zone
m.addZone(80, 100, 0, 85, &hff6666)

// Add a text label centered at (100, 60) with 12 pts Arial Bold font
call m.addText(100, 60, "PSI", "arialbd.ttf", 12, CDBaseChartMBS.kTextColor, CDBaseChartMBS.kCenter)

// Add a text box at the top right corner of the meter showing the value
// formatted to 2 decimal places, using white text on a black background, and
// with 1 pixel 3D depressed border
m.addText(156, 8, m.formatValue(value, "2"), "arial.ttf", 8, &hffffff).setBackground(&h000000, 0, -1)

// Add a semi-transparent blue (40666699) pointer with black border at the
// specified value
call m.addPointer(value, &h40666699, &h000000)

// Output the chart
Backdrop=m.makeChartPicture

Subclass of the CDBaseMeterMBS class.

  • 40 methods
    • method addGlare
    • method addGlare(radius as Double, span as Double = 135, rotate as Double = 0.0)
    • method addGlare(radius as Double, span as Double, rotate as Double, glareRadius as Double, intensity as Double = 0.13)
    • method addPointer(value as Double, fillColor as color, edgeColor as color = &cFFFFFFFF, pointerType as Integer = 6) as CDMeterPointerMBS
    • method addPointer(value as Double, fillColor as color, edgeColor as color, pointerType as Integer, startOffset as Double) as CDMeterPointerMBS
    • method addPointer(value as Double, fillColor as color, edgeColor as color, pointerType as Integer, startOffset as Double, endOffset as Double) as CDMeterPointerMBS
    • method addPointer(value as Double, fillColor as color, edgeColor as color, pointerType as Integer, startOffset as Double, endOffset as Double, widthRatio as Double) as CDMeterPointerMBS
    • method addPointer(value as Double, fillColor as Integer, edgeColor as Integer = -1, pointerType as Integer = 6) as CDMeterPointerMBS
    • method addPointer(value as Double, fillColor as Integer, edgeColor as Integer, pointerType as Integer, startOffset as Double) as CDMeterPointerMBS
    • method addPointer(value as Double, fillColor as Integer, edgeColor as Integer, pointerType as Integer, startOffset as Double, endOffset as Double) as CDMeterPointerMBS
    • method addPointer(value as Double, fillColor as Integer, edgeColor as Integer, pointerType as Integer, startOffset as Double, endOffset as Double, widthRatio as Double) as CDMeterPointerMBS
    • method addRing(startRadius as Integer, endRadius as Integer, fillColor as color, edgeColor as color)
    • method addRing(startRadius as Integer, endRadius as Integer, fillColor as Integer, edgeColor as Integer = -1)
    • method addRingSector(startRadius as Integer, endRadius as Integer, a1 as Double, a2 as Double, fillColor as color, edgeColor as color)
    • method addRingSector(startRadius as Integer, endRadius as Integer, a1 as Double, a2 as Double, fillColor as Integer, edgeColor as Integer = -1)
    • method addScaleBackground(bgRadius as Integer, fillColor as color, edgeWidth as Integer = 0, edgeColor as color = &cFFFFFFFF, scaleRadius as Integer = -2147483647)
    • method addScaleBackground(bgRadius as Integer, fillColor as color, edgeWidth as Integer, edgeColor as color, scaleRadius as Integer, startAngle as Double, endAngle as Double)
    • method addScaleBackground(bgRadius as Integer, fillColor as Integer, edgeWidth as Integer = 0, edgeColor as Integer = -1, scaleRadius as Integer = -2147483647)
    • method addScaleBackground(bgRadius as Integer, fillColor as Integer, edgeWidth as Integer, edgeColor as Integer, scaleRadius as Integer, startAngle as Double, endAngle as Double)
    • method addZone(startValue as Double, endValue as Double, fillColor as color, edgeColor as color)
    • method addZone(startValue as Double, endValue as Double, fillColor as Integer, edgeColor as Integer = -1)
    • method addZone(startValue as Double, endValue as Double, startRadius as Integer, endRadius as Integer, fillColor as color, edgeColor as color)
    • method addZone(startValue as Double, endValue as Double, startRadius as Integer, endRadius as Integer, fillColor as Integer, edgeColor as Integer = -1)
    • method Constructor(width as Integer, height as Integer, bgColor as color, edgeColor as color, raisedEffect as Integer = 0)
    • method Constructor(width as Integer, height as Integer, bgColor as Integer = &hffff0000, edgeColor as Integer = &hff000000, raisedEffect as Integer = 0)
    • method relativeLinearGradient(gradient() as Double, angle as Double = 0.0, radius as Double = -1.0) as Integer
    • method relativeRadialGradient(gradient() as Double, radius as Double = -1.0) as Integer
    • method setCap(radius as Integer, fillColor as color, edgeColor as color)
    • method setCap(radius as Integer, fillColor as Integer, edgeColor as Integer = &hffff0001)
    • method setCap2(backcolor as Color = &c888888, frontColor as Color = &c000000, frontEdgeColor as Color = &c888888)
    • method setCap2(backcolor as Color, frontColor as Color, frontEdgeColor as Color, lightingRatio as Double)
    • method setCap2(backcolor as Color, frontColor as Color, frontEdgeColor as Color, lightingRatio as Double, backRadiusRatio as Double)
    • method setCap2(backcolor as Color, frontColor as Color, frontEdgeColor as Color, lightingRatio as Double, backRadiusRatio as Double, frontRadiusRatio as Double)
    • method setCap2(backcolor as Color, frontColor as Color, frontEdgeColor as Color, lightingRatio as Double, backRadiusRatio as Double, frontRadiusRatio as Double, frontEdgeWidthRatio as Double)
    • method setCap2(backcolor as Integer = &h888888, frontColor as Integer = &h000000, frontEdgeColor as Integer = &h888888)
    • method setCap2(backcolor as Integer, frontColor as Integer, frontEdgeColor as Integer, lightingRatio as Double)
    • method setCap2(backcolor as Integer, frontColor as Integer, frontEdgeColor as Integer, lightingRatio as Double, backRadiusRatio as Double)
    • method setCap2(backcolor as Integer, frontColor as Integer, frontEdgeColor as Integer, lightingRatio as Double, backRadiusRatio as Double, frontRadiusRatio as Double)
    • method setCap2(backcolor as Integer, frontColor as Integer, frontEdgeColor as Integer, lightingRatio as Double, backRadiusRatio as Double, frontRadiusRatio as Double, frontEdgeWidthRatio as Double)
    • method setMeter(cx as Integer, cy as Integer, radius as Integer, startAngle as Double, endAngle as Double)

Super class CDBaseMeterMBS

  • 21 methods
    • method addColorScale(colorStops() as Double, startPos as Integer = -2147483647, startWidth as Integer = -2147483647, endPos as Integer = -2147483647, endWidth as Integer = -2147483647, edgeColor as Integer = -1)
    • method addColorScale(colorStops() as Double, startPos as Integer, startWidth as Integer, endPos as Integer, endWidth as Integer, edgeColor as color)
    • method addLabel(v as Double, label as string)
    • method addPointer(value as Double, fillColor as color, edgeColor as color) as CDMeterPointerMBS
    • method addPointer(value as Double, fillColor as Integer = &hffff0001, edgeColor as Integer = -1) as CDMeterPointerMBS
    • method getCoor(v as Double) as Integer
    • method getLabel(v as Double) as string
    • method getTicks as CDArrayMBS
    • method setLabelFormat(mainLabelFormat as string)
    • method setLabelPos(labelInside as boolean, labelOffset as Integer = 0)
    • method setLabelStyle(font as string = "", fontsize as Double = -1, fontcolor as Integer = &hffff0002, fontAngle as Double = 0) as CDTextBoxMBS
    • method setLabelStyle(font as string, fontsize as Double, fontcolor as color, fontAngle as Double = 0) as CDTextBoxMBS
    • method setLineWidth(axisWidth as Integer, majorTickWidth as Integer = 1, minorTickWidth as Integer = 1, microTickWidth as Integer = 1)
    • method setMeterColors(axisColor as color, labelColor as color, tickColor as color)
    • method setMeterColors(axisColor as Integer, labelColor as Integer = -1, tickColor as Integer = -1)
    • method setScale(lowerLimit as Double, upperLimit as Double, labels() as Double, formatstring as string = "")
    • method setScale(lowerLimit as Double, upperLimit as Double, labels() as string)
    • method setScale(lowerLimit as Double, upperLimit as Double, majorTickInc as Double = 0, minorTickInc as Double = 0, microTickInc as Double = 0)
    • method setTickLength(majorLen as Integer)
    • method setTickLength(majorLen as Integer, minorLen as Integer)
    • method setTickLength(majorLen as Integer, minorLen as Integer, microLen as Integer)

Super class CDBaseChartMBS

  • 2 properties
  • shared property ScaleFactor as Double
  • 91 methods
    • method addExtraField(numbers() as Double)
    • method addExtraField(paths() as folderitem)
    • method addExtraField(texts() as string)
    • method addLegend(x as Integer, y as Integer, noOfCols as Integer, font as string = "", fontsize as Double = 10) as CDLegendBoxMBS
    • method addLegend(x as Integer, y as Integer, vertical as boolean=true, font as string = "", fontsize as Double = 10) as CDLegendBoxMBS
    • method addLine(x1 as Integer, y1 as Integer, x2 as Integer, y2 as Integer, colorvalue as color, lineWidth as Integer = 1) as CDLineMBS
    • method addLine(x1 as Integer, y1 as Integer, x2 as Integer, y2 as Integer, colorvalue as Integer = &hffff0001, lineWidth as Integer = 1) as CDLineMBS
    • method addTable(x as Integer, y as Integer, alignment as Integer, col as Integer, row as Integer) as CDMLTableMBS
    • method addText(x as Integer, y as Integer, text as string, font as string = "", fontsize as Double = 8, fontcolor as Integer = &hffff0002, alignment as Integer = 7, angle as Double = 0, vertical as boolean=false) as CDTextBoxMBS
    • method addText(x as Integer, y as Integer, text as string, font as string, fontsize as Double, fontcolor as color, alignment as Integer = 7, angle as Double = 0, vertical as boolean=false) as CDTextBoxMBS
    • method addTitle(alignment as Integer, text as string, font as string = "", fontsize as Double = 12, fontColor as Integer = &hffff0002, bgColor as Integer = &hff000000, edgeColor as Integer = &hff000000) as CDTextBoxMBS
    • method addTitle(alignment as Integer, text as string, font as string, fontsize as Double, fontColor as color, bgColor as color, edgeColor as color) as CDTextBoxMBS
    • method addTitle(text as string, font as string = "", fontsize as Double = 12, fontColor as Integer = &hffff0002, bgColor as Integer = &hff000000, edgeColor as Integer = &hff000000) as CDTextBoxMBS
    • method addTitle(text as string, font as string, fontsize as Double, fontColor as color, bgColor as color, edgeColor as color) as CDTextBoxMBS
    • method adjustBrightness(ColorValue as color, brightness as Double) as Integer
    • method adjustBrightness(ColorValue as Integer, brightness as Double) as Integer
    • method Constructor   Private
    • method dashLineColor(colorvalue as color, patternCode as Integer = &h0505) as Integer
    • method dashLineColor(colorvalue as Integer, patternCode as Integer = &h0505) as Integer
    • method Destructor
    • method formatValue(value as Double, formatstring as string) as string
    • method getAbsOffsetX as Integer
    • method getAbsOffsetY as Integer
    • method getChartMetrics as string
    • method getColor(index as Integer) as Integer
    • method getDrawArea as CDDrawAreaMBS
    • method getHeight as Integer
    • method getHTMLImageMap(url as string, queryFormat as string = "", extraAttr as string = "", offsetX as Integer = 0, offsetY as Integer = 0) as string
    • method getLegend as CDLegendBoxMBS
    • method getWidth as Integer
    • method gradientColor(colors() as color, angle as Double = 90, scale as Double = 1.0, startX as Integer = 0, startY as Integer = 0) as Integer
    • method gradientColor(colors() as Integer, angle as Double = 90, scale as Double = 1.0, startX as Integer = 0, startY as Integer = 0) as Integer
    • method gradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as color, endColor as color) as Integer
    • method gradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as Integer, endColor as Integer) as Integer
    • method halfColor(c as Integer) as Integer
    • method initDynamicLayer as CDDrawAreaMBS
    • method layout
    • method layoutLegend as CDLegendBoxMBS
    • method linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, colors() as color, periodic as boolean=false) as Integer
    • method linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, colors() as Integer, periodic as boolean=false) as Integer
    • method linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as color, endColor as color, periodic as boolean=false) as Integer
    • method linearGradientColor(startX as Integer, startY as Integer, endX as Integer, endY as Integer, startColor as Integer, endColor as Integer, periodic as boolean=false) as Integer
    • method makeChart as CDDrawAreaMBS
    • method makeChart(format as Integer) as string
    • method makeChart(path as folderitem) as boolean
    • method makeChartPicture as picture
    • method patternColor(colorvalues() as color, height as Integer, startX as Integer = 0, startY as Integer = 0) as Integer
    • method patternColor(colorvalues() as Integer, height as Integer, startX as Integer = 0, startY as Integer = 0) as Integer
    • method patternColor(file as folderitem, startX as Integer = 0, startY as Integer = 0) as Integer
    • method patternColor(path as string, startX as integer = 0, startY as integer = 0) as integer
    • method patternColor(pic as picture, startX as Integer = 0, startY as Integer = 0) as Integer
    • method radialGradientColor(cx as Integer, cy as Integer, rx as Integer, ry as Integer, data() as Integer, periodic as boolean=false) as Integer
    • method radialGradientColor(cx as Integer, cy as Integer, rx as Integer, ry as Integer, startColor as color, endColor as color, periodic as boolean=false) as Integer
    • method radialGradientColor(cx as Integer, cy as Integer, rx as Integer, ry as Integer, startColor as Integer, endColor as Integer, periodic as boolean=false) as Integer
    • method removeDynamicLayer
    • method setAMPM(am as string, pm as string)
    • method setAntiAlias(shapeAntiAlias as Boolean, textAntiAlias as Integer)
    • method setBackground(colorvalue as color, edgeColor as color, raisedEffect as Integer = 0)
    • method setBackground(colorvalue as Integer, edgeColor as Integer = &hff000000, raisedEffect as Integer = 0)
    • method setBgImage(img as string, align as Integer = 5)
    • method setBorder(colorvalue as color)
    • method setBorder(colorvalue as Integer)
    • method setColor(paletteEntry as Integer, colorvalue as color)
    • method setColor(paletteEntry as Integer, colorvalue as Integer)
    • method setColors(numbers() as color)
    • method setColors(numbers() as Integer)
    • method setColors(paletteEntry as Integer, numbers() as color)
    • method setColors(paletteEntry as Integer, numbers() as Integer)
    • method setDefaultColors(paletteEntry as Integer = 0)
    • method setDefaultFonts(normal as string, bold as string, italic as string, boldItalic as string)
    • method setDropShadow(ColorValue as color, OffsetX as Integer = 5, OffsetY as Integer = &h7fffffff, blurRadius as Integer = 5)
    • method setDropShadow(ColorValue as Integer = &hAAAAAA, OffsetX as Integer = 5, OffsetY as Integer = &h7fffffff, blurRadius as Integer = 5)
    • method setFontTable(index as Integer, font as string)
    • method setMonthNames(names() as string)
    • method setNumberFormat(thousandSeparator as string = "~", decimalPointChar as string = ".", signChar as string = "-")
    • method setOutputOptions(options as string)
    • method setResource(id as string, data as MemoryBlock)
    • method setResource(id as string, data as string)
    • method setResource(id as string, DataArea as CDDrawAreaMBS)
    • method setRoundedFrame(extColor as color, r1 as Integer = 10, r2 as Integer = -1, r3 as Integer = -1, r4 as Integer = -1)
    • method setRoundedFrame(extColor as Integer = &hFFFFFF, r1 as Integer = 10, r2 as Integer = -1, r3 as Integer = -1, r4 as Integer = -1)
    • method setSearchPath(path as string)
    • method setSize(width as Integer, height as Integer)
    • method setThickFrame(thickness as Integer, frameColor as Integer = -1, outerEdgeColor as Integer = -1, innerEdgeColor as Integer = -1)
    • method setTransparentColor(c as color)
    • method setTransparentColor(c as Integer)
    • method setTransparentColors(paletteEntry as Integer = 0)
    • method setWallpaper(img as folderitem)
    • method setWeekDayNames(names() as string)
    • method setWhiteOnBlackColors(paletteEntry as Integer = 0)
  • 67 shared methods
    • shared method AllPassFilter as Integer
    • shared method ArrowShape(angle as Double = 0.0, widthRatio as Double = 1, stemWidthRatio as Double = 0.5, stemLengthRatio as Double = 0.5) as Integer
    • shared method barLighting(startBrightness as Double = 0.75, endBrightness as Double = 1.5) as Integer
    • shared method blueMetalGradient as Integer()
    • shared method brushedGoldColor(texture as Integer = 2, angle as Integer = 90) as Integer
    • shared method brushedMetalColor(c as Integer, texture as Integer = 2, angle as Integer = 90) as Integer
    • shared method brushedSilverColor(texture as Integer = 2, angle as Integer = 90) as Integer
    • shared method bSearch(values() as Double, value as Double) as Double
    • shared method chartTime(t as Integer) as Double
    • shared method chartTime(year as Integer, month as Integer, day as Integer, hour as Integer = 0, minute as Integer = 0, second as Integer = 0) as Double
    • shared method ClearTypeColor(gamma as Double = 0) as Integer
    • shared method ClearTypeMono(gamma as Double = 0) as Integer
    • shared method ColorToInteger(c as color, alpha as Integer = 0) as Integer
    • shared method Cross2Shape(width as Double = 0.5) as Integer
    • shared method CrossShape(width as Double = 0.5) as Integer
    • shared method cylinderEffect(orientation as Integer = 5, ambientIntensity as Double = 0.5, diffuseIntensity as Double = 0.5, specularIntensity as Double = 0.75, shininess as Integer = 8) as Integer
    • shared method defaultPalette as Integer()
    • shared method flatBorder(thickness as Integer) as Integer
    • shared method getChartWeekDay(t as Double) as Integer
    • shared method getChartYMD(t as Double) as Integer
    • shared method getCopyright as string
    • shared method getDescription as string
    • shared method GetPath(path as folderitem) as string
    • shared method getVersion as Integer
    • shared method glassEffect(glareSize as Integer = 3, glareDirection as Integer = 8, raisedEffect as Integer = 5) as Integer
    • shared method goldColor(angle as Integer = 90) as Integer
    • shared method goldGradient as Integer()
    • shared method greenMetalGradient as Integer()
    • shared method kDataBound as Double
    • shared method kLinearTick as Double
    • shared method kLogTick as Double
    • shared method kMicroTickOnly as Double
    • shared method kMinorTickOnly as Double
    • shared method kNoValue as Double
    • shared method kTickInc as Double
    • shared method kTouchBar as Double
    • shared method metalColor(c as Integer, angle as Integer = 90) as Integer
    • shared method NonePassFilter as Integer
    • shared method phongLighting(ambientIntensity as Double = 0.5, diffuseIntensity as Double = 0.5, specularIntensity as Double = 0.75, shininess as Integer = 8) as Integer
    • shared method Polygon2Shape(slide as Integer) as Integer
    • shared method PolygonShape(slide as Integer) as Integer
    • shared method PolynomialRegression(n as Integer) as Integer
    • shared method redMetalGradient as Integer()
    • shared method RegularSpacingFilter(labelStep as Integer = 1, initialMargin as Integer = 0) as Integer
    • shared method RGB(r as Integer, g as Integer, b as Integer, a as Integer = 0) as Integer
    • shared method SelectItemFilter(item as Integer) as Integer
    • shared method SetFontSearchPath(path as folderitem)
    • shared method SetFontSearchPath(path as string)
    • shared method setLicenseCode(n as string, enddate as Integer, v1 as Integer, v2 as Integer)
    • shared method setResourceGlobal(id as string, data as MemoryBlock)
    • shared method setResourceGlobal(id as string, data as string)
    • shared method setResourceGlobal(id as string, DrawArea as CDDrawAreaMBS)
    • shared method silverColor(angle as Integer = 90) as Integer
    • shared method silverGradient as Integer()
    • shared method softLighting(direction as Integer = 8, raisedEffect as Integer = 4) as Integer
    • shared method StarShape(slide as Integer) as Integer
    • shared method StartOfDayFilter(labelStep as Integer = 1, initialMargin as Double = 0.05) as Integer
    • shared method StartOfHourFilter(labelStep as Integer = 1, initialMargin as Double = 0.05) as Integer
    • shared method StartOfMinuteFilter(labelStep as Integer = 1, initialMargin as Double = 0.05) as Integer
    • shared method StartOfMonthFilter(labelStep as Integer = 1, initialMargin as Double = 0.05) as Integer
    • shared method StartOfSecondFilter(labelStep as Integer = 1, initialMargin as Double = 0.05) as Integer
    • shared method StartOfWeekFilter(labelStep as Integer = 1, initialMargin as Double = 0.05) as Integer
    • shared method StartOfYearFilter(labelStep as Integer = 1, initialMargin as Double = 0.05) as Integer
    • shared method testFont(font as string, fontIndex as Integer, fontHeight as Double, fontWidth as Double, angle as Double, byref buffer as string) as boolean
    • shared method transparentPalette as Integer()
    • shared method whiteOnBlackPalette as Integer()
    • shared method xySize(x as Integer, y as Integer) as Integer
  • 186 constants

This class has no sub classes.

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes


The items on this page are in the following plugins: MBS ChartDirector Plugin.


CDAngularAxisMBS   -   CDAreaLayerMBS


The biggest plugin in space...