internal SkinTextureJob(Int32 width, Int32 height, Int32 crossWidth, Int32 borderWidth, Byte aaFactor, Color borderColor, Color crossColor, Color topColor, Color rightColor, Color bottomColor, Color leftColor) { this.sampleFactor = (Int32)Mathf.Pow(2f, aaFactor); this.texWidth = width * this.sampleFactor; this.texHeight = height * this.sampleFactor; this.borderWidth = borderWidth * this.sampleFactor; this.texArray = new NativeArray <Color>(this.texWidth * this.texHeight, Allocator.TempJob); this.crossSize = crossWidth; this.borderMaxW = this.texWidth - this.borderWidth; this.borderMaxH = this.texHeight - this.borderWidth; this.borderColor = borderColor; this.crossColor = crossColor; this.topColor = topColor; this.rightColor = rightColor; this.bottomColor = bottomColor; this.leftColor = leftColor; this.handle = default; this.aaJob = default; this.handle = this.Schedule(this.texWidth * this.texHeight, 1); if (this.sampleFactor > 1) { this.aaJob = new AntiAliasJob(this.texWidth / this.sampleFactor, this.texHeight / this.sampleFactor, this.sampleFactor, this.texArray, this.handle); } }
internal BarTextureJob(Int32 width, Int32 height, Boolean roundedCorners, Int32 cornerRadius, Int32 borderWidth, Color borderColor, Color bgColor, ColorRegion[] regions, Byte aaFactor = 0) { this.sampleFactor = (Int32)Mathf.Pow(2f, aaFactor); this.texWidth = width * this.sampleFactor; this.texHeight = height * this.sampleFactor; this.roundedCorners = roundedCorners; this.borderWidth = borderWidth * this.sampleFactor; this.borderColor = borderColor; this.bgColor = bgColor; this.regions = new NativeArray <ColorRegion>(regions, Allocator.TempJob); this.texArray = new NativeArray <Color>(this.texWidth * this.texHeight, Allocator.TempJob); this.cornerRadSq = cornerRadius * this.sampleFactor; this.fillWidth = this.texWidth - this.borderWidth - this.borderWidth; this.cornerLeft = cornerRadius * this.sampleFactor; this.cornerRight = this.texWidth - (cornerRadius * this.sampleFactor); this.cornerTop = cornerRadius * this.sampleFactor; this.cornerBot = this.texHeight - (cornerRadius * this.sampleFactor); this.outerColor = this.borderWidth > 0 ? this.borderColor : this.bgColor; this.outerColor.a = 0f; this.handle = default; this.aaJob = default; this.handle = this.Schedule(this.texWidth, 1); if (this.sampleFactor > 1) { this.aaJob = new AntiAliasJob(this.texWidth / this.sampleFactor, this.texHeight / this.sampleFactor, this.sampleFactor, this.texArray, this.handle); } }